Closed Bug 593378 Opened 14 years ago Closed 14 years ago

browser_autofocus_background.js failed always on current trunk

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- beta7+

People

(Reporter: masayuki, Assigned: Felipe)

References

Details

(Keywords: regression)

Attachments

(2 files)

browser_autofocus_background.js failed on current trunk. See bug 593377, unfortunately, we miss-catch the regression. > TEST-START | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js > TEST-INFO | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | Console message: [JavaScript Error: "FullZoom.onLocationChange is not a function" {file: "chrome://browser/content/browser.js" line: 8566}] > TEST-PASS | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | The background tab's focused element should be INPUT > TEST-PASS | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | The background tab's focused element should not be the focus manager focused element > TEST-INFO | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | Console message: [JavaScript Error: "FullZoom.onLocationChange is not a function" {file: "chrome://browser/content/browser.js" line: 8406}] > TEST-INFO | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | Test took 0.138s to complete > > TEST-INFO | checking window state > TEST-INFO | before wait for focus -- loaded: complete active window: ([object ChromeWindow]) chrome://browser/content/browser.xul focused window: ([object XPCNativeWrapper [object Window]]) data:text/html,<!DOCTYPE%20html><html><body><input%20autofocus%20id='target'></body></html> desired window: ([object ChromeWindow]) chrome://browser/content/browser.xul child window: ([object XPCNativeWrapper [object Window]]) data:text/html,<!DOCTYPE%20html><html><body><input%20autofocus%20id='target'></body></html> docshell visible: true > TEST-INFO | already focused > TEST-INFO | maybe run tests <load:true, focus:true> -- loaded: complete active window: ([object ChromeWindow]) chrome://browser/content/browser.xul focused window: ([object XPCNativeWrapper [object Window]]) data:text/html,<!DOCTYPE%20html><html><body><input%20autofocus%20id='target'></body></html> desired window: ([object ChromeWindow]) chrome://browser/content/browser.xul child window: ([object XPCNativeWrapper [object Window]]) data:text/html,<!DOCTYPE%20html><html><body><input%20autofocus%20id='target'></body></html> docshell visible: true > TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/dom/tests/browser/browser_autofocus_background.js | application timed out after 330 seconds with no output
blocking2.0: --- → ?
Mounir, seems like this is your test. Can you investigate?
Assignee: nobody → mounir.lamouri
blocking2.0: ? → betaN+
This bug occurs on all three Tier-1 platforms. I have bisected it on Linux, the first bad changeset is 26cb1dc48637: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e908e7581686&tochange=a5d1b45234b8
Blocks: 559991, 449734
It looks like the code added in bug 559991 to restore FullZoom.onLocationChange at the end of the test is not actually working. Maybe we need to delete the property or something? My JS-fu is weak.
Assignee: mounir.lamouri → felipc
blocking2.0: betaN+ → beta6+
Attached file stack for assertion (deleted) —
There's a bunch of interesting assertions when running --browser-chrome tests on Linux, some of which I think are related to the underlying bug here. Here's one: ###!!! ASSERTION: Bad life cycle.: 'mStarted', file parser/html/nsHtml5TreeOpExecutor.cpp, line 118 Note that the JS stack indicates we're in an "onLocationChange" handler. I also noted that mBrowser.docShell.isBeingDestroyed is true while this occurs.
This is very odd. Even if the test from bug 559991 failed to clean-up, FullZoom.onLocationChange would never be defined to something that is "not a function". For some reason the original function is being lost with the closure.
Attached patch Fix tests (deleted) — Splinter Review
So these were two independent problems. The warnings generated by browser_bug559991.js was because the clean-up function is being ran twice. The browser_autofocus_background.js pass all tests but times out because it closes all the tabs from the test window, and then the test harness don't go on. (rs=gavin on IRC for the browser_bug559991.js change)
Attachment #473711 - Flags: review?(mounir.lamouri)
Comment on attachment 473711 [details] [diff] [review] Fix tests Thank you for this fix :)
Attachment #473711 - Flags: review?(mounir.lamouri) → review+
Thanks. I sent both changes to tryserver and will wait for results before landing. Mats, it'd be great if you could test this patch with your test too.
mochitest-browser-chrome ran green on tryserver, pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/2608c0d52a27
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
Thanks, it fixed the FullZoom errors for me. I filed bug 595334 for the assertion in comment 4, which I still see with this fix.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: