Closed
Bug 529922
Opened 15 years ago
Closed 14 years ago
Improve the test for bug 529667 to make sure it's running after delayedStartup
Categories
(Firefox :: Private Browsing, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3.7a5
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 3 obsolete files)
2.69 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
Spawn from bug 529667 comment 8. This replaces delayedStartup instead of relying on a couple of executeSoon calls. Note that this is only needed on 1.9.2, since bug 512645 on trunk makes sure that the correct behavior can be expected there.
Attachment #413428 -
Flags: review?(vladimir)
Updated•15 years ago
|
Summary: Improve the test for bug 529667 on 1.9.2 → Fix the test for bug 529667 on 1.9.2
Assignee | ||
Updated•14 years ago
|
Attachment #413428 -
Flags: review?(vladimir) → review?(gavin.sharp)
Updated•14 years ago
|
Attachment #413428 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 1•14 years ago
|
||
Landed this on 1.9.2: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/61ca95389aa2
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
status1.9.2:
--- → .5-fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [does not need trunk landing]
Assignee | ||
Comment 2•14 years ago
|
||
This turned our browser-chrome PB tests orange. The patch must have bitrotted since I wrote it for some reason. http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.6/1275424537.1275425496.24006.gz I backed it out: http://hg.mozilla.org/releases/mozilla-1.9.2/rev/2cb83e106cf7 I don't think this is worth me spending any more time on. We haven't had intermittent oranges because of this on 1.9.2. So I'm WONTFIXing this until we have an evidence that this deserves someone working on, and I'll take it again at that point.
status1.9.2:
.5-fixed → ---
Flags: in-testsuite+
Resolution: FIXED → WONTFIX
Whiteboard: [does not need trunk landing]
Comment 3•14 years ago
|
||
Oh, it went orange because the setTimeout(delayedStartup) happens before you replace it, presumably. I should have thought of that!
Comment 4•14 years ago
|
||
(In reply to comment #2) > The patch must have bitrotted since I wrote it for some reason. There has been no change to that file since its initial landing. The test gives a false sense of validity, so it should definitely be fixed or removed.
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #3) > Oh, it went orange because the setTimeout(delayedStartup) happens before you > replace it, presumably. I should have thought of that! Hmm, right. But I assume that accessing delayedStartup before the load event is not safe, right? So what can be done here?
Assignee | ||
Comment 6•14 years ago
|
||
Wouldn't changing the nested executeSoon calls to a setTimeout(..., 100) be an easier way to solve this?
Comment 7•14 years ago
|
||
Probably... but it's impossible to tell this from just running the test, since it passes if it fails to wait for delayedStartup. If you can make it report a failure in that case, that would be a good fix for trunk as well.
Assignee | ||
Comment 8•14 years ago
|
||
How would I do that? The only way that I can think of is adding something like |window.didMyDelayedStartup = true;| at the end of delayedStartup and check for that in the test, but that sounds really dirty... :/
Comment 9•14 years ago
|
||
delayedStartup does a couple of things that could be checked, but it all seems fragile... Maybe check whether win.document.activeElement == win.gURLBar.inputField?
Assignee | ||
Comment 10•14 years ago
|
||
The focused element would be the browser element, not the URL bar, and that happens inside the BrowserStartup function. I decided to see if gPrivateBrowsingUI is initialized. This object is initialized at delayedStartup, and it's at least relevant to private browsing. I'll prepare a branch patch as well.
Attachment #449151 -
Flags: review?(dao)
Assignee | ||
Updated•14 years ago
|
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Comment 11•14 years ago
|
||
I've also submitted this patch to the try server to make sure that it doesn't break anything.
Attachment #413428 -
Attachment is obsolete: true
Attachment #449156 -
Flags: review?(dao)
Assignee | ||
Comment 12•14 years ago
|
||
Comment on attachment 449156 [details] [diff] [review] Patch (v2) Try server results were not promising yet. I'm doing a local build to try to reproduce and fix the problem.
Attachment #449156 -
Flags: review?(dao)
Assignee | ||
Updated•14 years ago
|
Attachment #449151 -
Flags: review?(dao) → review?(gavin.sharp)
Comment 13•14 years ago
|
||
Does DOMContentLoaded work? It should put you before BrowserStartup. The problem with _privateBrowsingService is that it could be a smart getter (i.e. it's not forward compatible). I'm not actually sure what went wrong with the first patch, given that browser_bug495058.js works fine.
Assignee | ||
Updated•14 years ago
|
Attachment #449156 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 14•14 years ago
|
||
(In reply to comment #13) > Does DOMContentLoaded work? It should put you before BrowserStartup. > The problem with _privateBrowsingService is that it could be a smart getter > (i.e. it's not forward compatible). This is a problem that I don't want to solve here. This should work correctly on trunk even without that sanity patch (I'm in fact fine with just not taking the trunk patch at all), and we're not going to change _privateBrowsingService to a smart getter on branch. > I'm not actually sure what went wrong with the first patch, given that > browser_bug495058.js works fine. I'm not sure, but the second patch WFM locally, although it didn't on the try server.
Status: REOPENED → ASSIGNED
Comment 15•14 years ago
|
||
I'd rather see this hardened on trunk as well. The nested executeSoons seem fragile. E.g. I think there were considerations of delaying delayedStartup further.
Updated•14 years ago
|
Attachment #449151 -
Flags: review?(gavin.sharp) → review+
Comment 16•14 years ago
|
||
Comment on attachment 449151 [details] [diff] [review] Make sure delayedStartup is run (though I agree that this is fragile - I wouldn't mind adding a notifyObservers() to the end of delayedStartup)
Assignee | ||
Comment 17•14 years ago
|
||
(In reply to comment #16) > (From update of attachment 449151 [details] [diff] [review]) > (though I agree that this is fragile - I wouldn't mind adding a > notifyObservers() to the end of delayedStartup) OK, maybe I'll just bite the bullet and do that. :-)
Assignee | ||
Comment 18•14 years ago
|
||
Attachment #449151 -
Attachment is obsolete: true
Attachment #450179 -
Flags: review?(gavin.sharp)
Updated•14 years ago
|
Attachment #450179 -
Flags: review?(gavin.sharp) → review+
Comment 19•14 years ago
|
||
Comment on attachment 450179 [details] [diff] [review] trunk patch >diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_newwindow_stopcmd.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_newwindow_stopcmd.js > let win = OpenBrowserWindow(); >+ Services.obs.addObserver(function(subject, topic, data) { >+ Services.obs.removeObserver(arguments.callee, "browser-delayed-startup-finished"); >+ var win = subject.QueryInterface(Ci.nsIDOMWindow); name this notifiedWin, and sanity check it against the closed-over "win"?
Assignee | ||
Comment 20•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/4e6e91e0a42b http://hg.mozilla.org/mozilla-central/rev/41b7a6acaa16 Gavin, do you want the same approach on branch as well?
Status: ASSIGNED → RESOLVED
Closed: 14 years ago → 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Summary: Fix the test for bug 529667 on 1.9.2 → Improve the test for bug 529667 to make sure it's running after delayedStartup
Target Milestone: --- → Firefox 3.7a5
Assignee | ||
Comment 21•14 years ago
|
||
Gavin: ping?
Comment 22•14 years ago
|
||
Sure, same approach on branch seems fine.
Updated•14 years ago
|
Attachment #449156 -
Attachment is obsolete: true
Attachment #449156 -
Flags: review?(gavin.sharp)
You need to log in
before you can comment on or make changes to this bug.
Description
•