Closed Bug 575524 Opened 14 years ago Closed 14 years ago

browser_bug562890.js fails with other application extensions installed


(Toolkit :: Add-ons Manager, defect, P1)






(Reporter: philor, Assigned: robert.strong.bugs)



(Keywords: intermittent-failure)


(2 files, 2 obsolete files)

From building the Fx 4.0b1 release:
linux64_test mochitest-other on 2010/06/28 22:08:14

linux_test mochitest-other on 2010/06/28 21:52:25

win32_test mochitest-other on 2010/06/28 23:02:35

TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/extensions/test/browser/browser_bug562890.js | Prefs button should be shown for addon with a optionsURL set - Got true, expected false
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/extensions/test/browser/browser_bug562890.js | Timed out
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/extensions/test/browser/browser_bug562890.js | Found an unexpected tab at the end of test run: about:addons
macosx64_test mochitest-other on 2010/06/28 22:30:15

(same failures as above, followed by every test that checks active installs failing like

TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js | Should be no active installs at the end of the test - Got 1, expected 0


TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/plugins/tests/browser_bug435788.js | Should be just one install - Got 2, expected 1
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/plugins/tests/browser_bug435788.js | Should be fully installed - Got 3, expected 6
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/plugins/tests/browser_bug435788.js | Should have installed the extension - Got, expected">
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/plugins/tests/browser_bug435788.js | Should be one active installs - Got 2, expected 1
TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/mozapps/plugins/tests/browser_bug435788.js | Should not be any installs - Got 1, expected 0)

Two variables: it's 4.0b1 rather than 4.0b1pre, and it's --enable-official-branding rather than Minefield.

FWIW, the test passes for me in 4.0b2pre + official branding.

Don't actually know how we handle test failures on release builds, so I'm just guessing it's a P1 blocker rather than a normal whatever (at the very least, until we know whether it's the test failing, or what the test is supposed to test failing)
macosx_test mochitest-other on 2010/06/28 23:31:48
so that's all platforms.
Possibly similar to Bug 573246? Perhaps browser_bug562890.js wasn't verified to work with the Feedback extension installed.
I highly suspect that is the case since the test uses
var addonItem = addonList.childNodes[0];

and the add-on name is "Test add-on 1". If the Feedback extension does not start with a character that would be after Test when sorted alphabetically it would end up being returned by the above code.
Attached patch possible patch - untested (obsolete) — Splinter Review
I need to recompile before I can test this. Also note that browser_bug562890 has PC instead of UNIX line endings which should be fixed at the same time... I'll attach a separate patch for this so review is easier.
Attached patch fix line endings (obsolete) — Splinter Review
btw: I am taking 1/2 day PTO tomorrow so if this needs to land please do so.
Surprised the Seamonkey guys didn't pick this up sooner. This landed after I did all the tests with Feedback so missed it. There doesn't seem to be anything troubling about the failure except that it is possible we are masking failures in future tests I guess.
Summary: browser_bug562890.js fails on (official branding | releases with version numbers without pre) → browser_bug562890.js fails with other application extensions installed
Comment on attachment 454808 [details] [diff] [review]
possible patch - untested

Looks ok for now.

>diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug562890.js b/toolkit/mozapps/extensions/test/browser/browser_bug562890.js

>-    addonItem = addonList.childNodes[1];
>+    for (i = 0; i < addonList.childNodes.length; i++) {
>+      var addonItem = addonList.childNodes[i];

No need to redeclare the var here.

>+      if (addonItem.hasAttribute("name") &&
>+          addonItem.getAttribute("name") == "Test add-on 2")
>+        break;
>+    }
Attachment #454808 - Flags: review+
carrying forward r+
Assignee: nobody → robert.bugzilla
Attachment #454897 - Flags: review+
Attached patch fix line endingsSplinter Review
Would be a good thing to fix the line endings in this file at the same time.
Attachment #454808 - Attachment is obsolete: true
Attachment #454809 - Attachment is obsolete: true
Attachment #454900 - Flags: review?(dtownsend)
I also verified the patch fixes this bug by running the tests with an additional add-on with a name that starts with a in the app dir's extensions directory. I'm going to be away from the computer for several hours so feel free to land (preferably after the line endings review).
Comment on attachment 454900 [details] [diff] [review]
fix line endings

Yep, was just going to land this too
Attachment #454900 - Flags: review?(dtownsend) → review+
Landed on trunk:
And on the relbranch:
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b1
Blocks: 438871
Depends on: 604136
No more failures since the patch has been landed. Marking as verified fixed.
Flags: in-testsuite+
Flags: in-litmus-
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.