Closed Bug 748498 Opened 7 years ago Closed 7 years ago

Sites can be updated with wrong title

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 15
Tracking Status
firefox14 --- verified
firefox15 --- verified
blocking-fennec1.0 --- +

People

(Reporter: bnicholson, Assigned: bnicholson)

Details

(Whiteboard: [testday-20120518])

Attachments

(1 file, 1 obsolete file)

STR:

1) Go to some page (I use about:home)
2) Open a site that takes a few seconds to load. An easy one is http://people.mozilla.com/~bnicholson/test/loop.html (warning: will hang Firefox for 5 seconds).
3) While it's loading, push the back button.
4) Look at the page in the AwesomeScreen.

Expected result:
Page will either have no title or the correct title.

Actual result:
Page's title changed to the previous page - in this case, "Fennec Start".

I was able to reproduce this on a number of sites (Google search, Zimbra, and the link given above).
Attached patch patch (obsolete) — Splinter Review
Following this sequence of events:
* Load about:home
* Load slow page
* Click back during load

we can apparently get a DOMContentLoaded event for the slow page *after* we receive a document start event for about:home. This patch makes sure we match titles with their correct page URLs in these cases.
Attachment #618094 - Flags: review?(mark.finkle)
Comment on attachment 618094 [details] [diff] [review]
patch

IRL we talked about not changing updateTitle and just testing in the handleTitleChanged and handleContentLoaded.

It doesn't feel right to add pass the url to updateTitle for checking internally.
Attachment #618094 - Flags: review?(mark.finkle) → review-
blocking-fennec1.0: ? → +
Attached patch patch v2Splinter Review
If we set the URL on location change, we don't have to worry about setting the tab URL too early (which means we don't need to worry about events being out of sync with the tab state).
Attachment #618094 - Attachment is obsolete: true
Attachment #618757 - Flags: review?(mark.finkle)
Attachment #618757 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/5728d1210dbe
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Comment on attachment 618757 [details] [diff] [review]
patch v2

[Approval Request Comment]
Regression caused by (bug #): bug 746380
User impact if declined: page may be saved in history with wrong title
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): low risk
String changes made by this patch: none
Attachment #618757 - Flags: approval-mozilla-aurora?
Attachment #618757 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
I verify that this bug is fixed on beta version (v14).
Whiteboard: [testday-20120518]
The issue is not reproducible anymore on:
Nightly Fennec 15.0a1 (2012-05-22)
Aurora Fennec 14.0a2 (2012-05-22)
Device: HTC Desire Z
OS: Android 2.3.3

Using the STR from comment 0. There is no title in the AwesomeScreen.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.