Closed Bug 555042 Opened 15 years ago Closed 15 years ago

[mozmill] Failure in testPopupsAllowed.js when run in Firefox 3.6.x

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: marklocklear, Assigned: marklocklear)

References

Details

(Whiteboard: [mozmill-test-failure])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3pre) Gecko/20100324 Ubuntu/9.10 (karmic) Namoroka/3.6.3pre Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3pre) Gecko/20100324 Ubuntu/9.10 (karmic) Namoroka/3.6.3pre When I run the entire test suite I get a failure in testPopups/testPopupsAllowed.js, however when I run the test by itself, it passes. I noticed when I run both the tests in the testPopups folder, then testtPopupsAllowed.js also fails. I found if I comment out line 84- controller.assertNodeNotExist(button); that the test passes. I think the script is looking for the popups blocked status bar/button and because it finds this, it fails. However the status bar is only there because of the testPopupsBlocked.js test that ran previously, it was never closed from the previous testcase. Reproducible: Always Steps to Reproduce: See Litmus Testcase ID #8367 - Popup Allowed (firefox-bin:3761): GLib-WARNING **: g_set_prgname() called multiple times ERROR - Test Failure: {u'exception': {u'message': u'Unexpectedly found element Lookup: /id("main-window")/id("browser")/id("appcontent")/id("content")/anon({"anonid":"tabbox"})/anon({"anonid":"panelcontainer"})/{"id":"panel1269550002807"}/{"value":"popup-blocked"}/anon({"type":"warning"})/{"class":"messageCloseButton tabbable"}', u'lineNumber': 684, u'stack': u'Error("Unexpectedly found element Lookup: /id(\\"main-window\\")/id(\\"browser\\")/id(\\"appcontent\\")/id(\\"content\\")/anon({\\"anonid\\":\\"tabbox\\"})/anon({\\"anonid\\":\\"panelcontainer\\"})/{\\"id\\":\\"panel1269550002807\\"}/{\\"value\\":\\"popup-blocked\\"}/anon({\\"type\\":\\"warning\\"})/{\\"class\\":\\"messageCloseButton tabbable\\"}")@:0\n([object Object])@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/controller.js:684\n()@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js -> file:///etc/mercurial/mozmill/firefox/testPopups/testPopupsAllowed.js:84\n((function () {var url = "https://litmus.mozilla.org/testcase_files/firefox/5918/index.html";PrefsAPI.preferencesDialog.open(prefDialogCallback);var windowCount = mozmill.utils.getWindows().length;controller.open(url);controller.waitForPageLoad();var button = tabBrowser.getTabPanelElement(tabBrowser.selectedIndex, "/{\\"value\\":\\"popup-blocked\\"}/anon({\\"type\\":\\"warning\\"})/{\\"class\\":\\"messageCloseButton tabbable\\"}");controller.assertNodeNotExist(button);var cssInfo = controller.window.getComputedStyle(controller.window.document.getElementById("page-report-button"), "");if (cssInfo.getPropertyValue("display") != "none") {throw "Status bar icon is visible";}if (windowCount == mozmill.utils.getWindows().length) {throw "Pop-ups were blocked";}}))@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js:468\n([object Object])@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js:520\n([object Object])@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js:562\n("/etc/mercurial/mozmill/firefox/testPopups")@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js:411\n("/etc/mercurial/mozmill/firefox/testPopups")@file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/frame.js:568\n((function (dir, invokedFromIDE) {var runner = new Runner(new Collector, invokedFromIDE);runner.runTestDirectory(dir);runner.end();return true;}),[object Array])@file:///tmp/tmpan7T20.mozrunner/extensions/jsbridge@mozilla.com/resource/modules/server.js:164\n("87c90294-384f-11df-8f05-0013ce8d5683",(function (dir, invokedFromIDE) {var runner = new Runner(new Collector, invokedFromIDE);runner.runTestDirectory(dir);runner.end();return true;}),[object Array])@file:///tmp/tmpan7T20.mozrunner/extensions/jsbridge@mozilla.com/resource/modules/server.js:168\n@file:///tmp/tmpan7T20.mozrunner/extensions/jsbridge@mozilla.com/resource/modules/server.js:244\n', u'fileName': u'file:///tmp/tmpan7T20.mozrunner/extensions/mozmill@mozilla.com/resource/modules/controller.js'}} Test Failed : testPopUpAllowed in /etc/mercurial/mozmill/firefox/testPopups/testPopupsAllowed.js
I duped bug 554897 to your one Mark because you have a bit more information in here. Next time please check if a bug already exists for an error you see. I had to go ahead today in filing all known issues.
Blocks: 527983
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mozmill-test-failure]
Assigning to myself.
Assignee: nobody → anthony.s.hughes
Status: NEW → ASSIGNED
Status: ASSIGNED → NEW
To fix this failure we simply have to close all tabs inside of setupModule as what we are doing in a couple of other tests. Mark, would you have interest to fix that test? I believe Anthony will be ok with it.
Yes, I will give it a shot.
Assignee: anthony.s.hughes → marklocklear
Status: NEW → ASSIGNED
Henrik, can you explain what you mean by closing the tabs in setupModule? Do you mean in the setupModule function... var setupModule = function(module) { controller = mozmill.getBrowserController(); tabBrowser = new TabbedBrowsingAPI.tabBrowser(controller); } ...do we need to do something with tabBrowser? You said there are other tests that are doing this. Which ones? If I look at those this might help me out...thanx...
Mark, have a look at the tests in the testTabBrowsing folder. You should see something similar to the following for closing tabs within the setupModule function: tabBrowser = new TabbedBrowsingAPI.tabBrowser(controller); tabBrowser.closeAllTabs();
Tests which do not have to use all the functionality of the tabBrowser class can make use of the simplified method which can also be found in this test: http://hg.mozilla.org/qa/mozmill-tests/file/default/firefox/testSecurity/testSafeBrowsingWarningPages.js
...thanx Anthony...that worked. Henrik, I will submit a patch file shortly.
Comment on attachment 439692 [details] [diff] [review] Patch adds tabBrowser.closeAllTabs(); to setup module Mark, please use the way I have proposed in comment 8.
Attachment #439692 - Flags: review-
Attachment #439692 - Attachment is obsolete: true
Attachment #439702 - Flags: review?
Attachment #439702 - Flags: review? → review?(hskupin)
Attachment #439702 - Attachment is patch: true
Attachment #439702 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 439702 [details] [diff] [review] Patch adds TabbedBrowsingAPI.closeAllTabs(controller); to setup module >diff --git a/firefox/testPopups/testPopupsAllowed.js b/firefox/testPopups/testPopupsAllowed.js > > controller = mozmill.getBrowserController(); > tabBrowser = new TabbedBrowsingAPI.tabBrowser(controller); >+ TabbedBrowsingAPI.closeAllTabs(controller); You can blame me. Sorry, but I haven't noticed last week that we are still using the tabBrowser in that test. That means your first patch was totally correct. Let's see if we can revert that.
Attachment #439702 - Flags: review?(hskupin) → review-
Attachment #439692 - Attachment is obsolete: false
Attachment #439692 - Flags: review- → review+
Attachment #439702 - Attachment is obsolete: true
Landed as: http://hg.mozilla.org/qa/mozmill-tests/rev/5503e9badefe http://hg.mozilla.org/qa/mozmill-tests/rev/c2ccc27a70d3 I also added that line to the teardownModule function of testPopupsBlocked.js so we make sure that later tests will not fail. Thanks Mark!
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Mass move of Mozmill Test related project bugs to newly created components. You can filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Component: General → Mozmill Tests
Product: Firefox → Mozilla QA
QA Contact: general → mozmill-tests
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: