Closed Bug 614079 Opened 14 years ago Closed 14 years ago

test-windows.testActiveWindow fails with "Non-browser windows aren't handled by this module"

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcepl, Assigned: ochameau)

References

Details

Attachments

(4 files, 1 obsolete file)

info: executing 'test-windows.testActiveWindow' console: [JavaScript Error: "gBrowser is not defined" {file: "chrome://browser/c ontent/browser.js" line: 330}] console: [JavaScript Error: "gBrowser is not defined" {file: "chrome://browser/c ontent/browser.js" line: 330}] ... test-windows.testActiveWindow: timed out
I have different error with 6f113e4f and Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9) Gecko/20110114 Firefox/4.0b9 (Fedora native build): info: executing 'test-windows.testActiveWindow' info: pass: Correct number of browser windows info: pass: Correct number of windows returned by iterator error: TEST FAILED: test-windows.testActiveWindow (failure) error: fail: Non-browser windows aren't handled by this module (({on:function on() {[native code]}, removeListener:function removeListener() {[native code]}, get title function () {[native code]}, close:function close() {[native code]}, activate:function activate() {[native code]}, get tabs function () {[native code]}}) != ({on:function on() {[native code]}, removeListener:function removeListener() {[native code]}, get title function () {[native code]}, close:function close() {[native code]}, activate:function activate() {[native code]}, get tabs function () {[native code]}})) info: Traceback (most recent call last): File "resource://testpkgs-addon-kit-tests/test-windows.js", line 278, in focusListener nextStep(); File "resource://testpkgs-addon-kit-tests/test-windows.js", line 253, in nextStep testSteps.shift()(); File "resource://testpkgs-addon-kit-tests/test-windows.js", line 216, in null test.assertEqual(windows.activeWindow, window2, "Non-browser windows aren't handled by this module"); File "resource://testpkgs-api-utils-lib/unit-test.js", line 195, in assertEqual this.fail(message); File "resource://testpkgs-api-utils-lib/unit-test.js", line 113, in fail console.trace();
Summary: test-windows.testActiveWindow fails with bde4bc010869fa6bebec249dec49375c0c28a0ca → test-windows.testActiveWindow fails with FF4b9 and 6f113e4f5
Still present on FF4b9 (Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9) Gecko/20110121 Firefox/4.0b9) and 0f9e14ea9d9f3251cbe925e2b69facd31376be8a.
Summary: test-windows.testActiveWindow fails with FF4b9 and 6f113e4f5 → test-windows.testActiveWindow fails with FF4b9 and 0f9e14ea9d9
FWIW, I'm not seeing this test failure against the same jetpack revision and FF4.0b9 on OS-X. test-widget.testConstructor fails, but test-windows.testActiveWindow appears to pass.
Yes, I can confirm that I cannot reproduce it with Mozilla/5.0 (X11; Linux x86_64; rv:2.0b10) Gecko/20110125 Firefox/4.0b10 and 0f9e14ea9d9f3251cbe925e2b69facd31376be8a
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I see this problem on tip with the latest Firefox 4 nightly build on 32bit Linux, but it's intermittent.
Blocks: 606351
Status: RESOLVED → REOPENED
OS: Linux → All
Hardware: x86_64 → All
Resolution: FIXED → ---
Status: REOPENED → NEW
Summary: test-windows.testActiveWindow fails with FF4b9 and 0f9e14ea9d9 → test-windows.testActiveWindow fails with "Non-browser windows aren't handled by this module"
Again could reproduce with Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20110213 Firefox/4.0b11 and 30f4b497aa5267526b93fb615bfd539c2ff3fa7a
Here is a simple patch that add a setTimeout in order to have this failure at all execution. It appears that instead of having window2 we get window3. For now, I didn't found why we get window3 and how to force to have it. FYI, this failure doesn't exists on windows.
Attached patch Fix (obsolete) — Splinter Review
Here is a proposal fix. I'm not really satisfied with this solution, but I didn't managed to force window2 to be the active window ... I tried : - Calling blur before focus, but it didn't work this time. https://bug606007.bugzilla.mozilla.org/attachment.cgi?id=499172 - Using nsIWindowWatcher.activeWindow without any success. https://bug606007.bugzilla.mozilla.org/attachment.cgi?id=509111 - Waiting on focus event bubble instead of capturing.
Attachment #513148 - Flags: review?(myk)
Comment on attachment 513148 [details] [diff] [review] Fix This patch seems to have been truncated at the 80th column. Perhaps a copy/paste issue?
Attachment #513148 - Flags: review?(myk) → review-
Attached patch Valid fixSplinter Review
Oooops sorry for this error. You were right, copy'n paste between VM is not a good idea!
Attachment #513242 - Flags: review?(myk)
Attachment #513148 - Attachment is obsolete: true
Comment on attachment 513242 [details] [diff] [review] Valid fix Hmm, yeah, it isn't ideal, and we should come up with a more robust fix for window activation on Linux in the long run, but this is a good short term fix. r=myk! And a=myk for landing during the freeze.
Attachment #513242 - Flags: review?(myk) → review+
Status: NEW → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Happened for me on Ubuntu with Add-on SDK 1.0b3RC1. Here are the logs: http://pastebin.mozilla.org/1088106 SDK: 1.0b3 RC1 Browser: FFx 4.0b11 Platform: Ubuntu The command that is executed from inside the integration script is: "cfx testall -b /Applications/Firefox4.0b11/Firefox.app"
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm not able to reproduce this one, nor on windows, nor on ubuntu 10.10 VM. Myk: are you able to reproduce it ? Ayan: during test execution were you doing anything or just let the test run ? I suppose that this bug is intermitent or did you got it fail every time ?
(In reply to comment #14) > I'm not able to reproduce this one, nor on windows, nor on ubuntu 10.10 VM. > Myk: are you able to reproduce it ? > > Ayan: during test execution were you doing anything or just let the test run ? > I suppose that this bug is intermitent or did you got it fail every time ? This is Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12 and I have 100% fail here on this one test (and this test only) with today's master (24c8f4a6). Just running cfx testall -v and nothing else.
Just to note ... still alive with 5e251f5d and Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20100101 Firefox/4.0 (Fedora/Rawhide package)
(In reply to comment #14) > I'm not able to reproduce this one, nor on windows, nor on ubuntu 10.10 VM. > Myk: are you able to reproduce it ? Yes, I see it frequently in my 32bit Ubuntu Linux 10.04 VM when running all `addon-kit` tests. When I run only `windows` tests, however, I don't see it. So the problem could be in the interaction between the `windows` tests and other tests. My Linux installation is fairly stock; I haven't made too many changes; so the window manager is the default one that ships with Ubuntu, etc. But let me know if I can provide any additional details about my configuration that might help you to reproduce the problem!
I can see this on SDK 1.0b4rc3, Firefox 4.0, ubuntu 9.0 while running cfx testall The logs are here - http://pastebin.mozilla.org/1190409
A quick note about bug 599204, that is extremelly close to this one. But the test from windows-utils seems more robust than the current test from windows API!
We can either fix the test or disable it, but we have to squash all intermittent test failures so Firefox/Gecko developers can rely on our automated test infrastructure to tell them when they do something that breaks the SDK.
Priority: -- → P1
Target Milestone: --- → 1.0
As I'm really unable to reproduce it in a any linux VM, I disabled the failing assertion.
Attachment #525401 - Flags: review?(myk)
Assignee: nobody → poirot.alex
Target Milestone: 1.0 → 1.0b5
Attachment #525401 - Flags: review?(myk) → review?(rFobic)
Comment on attachment 525401 [details] [diff] [review] Disable intermittent failing test Looks good.
Attachment #525401 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: