Closed
Bug 874028
Opened 12 years ago
Closed 12 years ago
Debugger tests use load event on tab (and therefore favicon) rather than on tab's browser to detect pageload
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: Gijs, Assigned: Gijs)
References
Details
Attachments
(1 file)
|
2.44 KB,
patch
|
past
:
review+
|
Details | Diff | Splinter Review |
The debugger's head.js addTab code contains this:
72 let tab = targetBrowser.selectedTab;
73 let win = tab.linkedBrowser.contentWindow;
74 let expectedReadyState = aURL == "about:blank" ? ["interactive", "complete"] : ["complete"];
75
76 if (aOnload) {
77 let handler = function() {
78 if (tab.linkedBrowser.currentURI.spec != aURL ||
79 expectedReadyState.indexOf((win.document || {}).readyState) == -1) {
80 return;
81 }
82 tab.removeEventListener("load", handler, false);
83 executeSoon(aOnload);
84 }
85 tab.addEventListener("load", handler, false);
86 }
Unfortunately, the tab (which is just the tabbrowser's <tab> element) doesn't actually have load events, except for the tab's favicon. The fact that this currently works at all is probably mostly due to the expectedReadyState checking and a miracle. Because of how we remove empty favicons on the UX branch, it completely fails to work there. It should probably listen to the tab's linkedBrowser's load event instead.
| Assignee | ||
Comment 1•12 years ago
|
||
This fixes the UX branch, AFAICT. I've also updated the netmonitor test; I don't believe any other tests are using the same code.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #751672 -
Flags: review?(past)
Comment 2•12 years ago
|
||
Comment on attachment 751672 [details] [diff] [review]
Patch
Review of attachment 751672 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #751672 -
Flags: review?(past) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Pushed: https://hg.mozilla.org/integration/fx-team/rev/108c6b3bf66e
Thanks for the quick r+!
Whiteboard: [fixed-in-fx-team]
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•