Bug 1231784 - Fix toolkit/mozapps/extensions/test/browser/browser_select_confirm.js, r=Mossop draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 22 Jan 2016 14:34:55 -0500
changeset 327080 041b4382421d5b5d4a691ebbef664c958de92c9e
parent 327079 3f0fb69072bbf6d03bdcc953ac10cc186596b75f
child 513650 373c5d3190f0cd7be5baf4f3a13dfc95e63c6326
push id10187
push userahalberstadt@mozilla.com
push dateFri, 29 Jan 2016 15:02:07 +0000
reviewersMossop
bugs1231784
milestone47.0a1
Bug 1231784 - Fix toolkit/mozapps/extensions/test/browser/browser_select_confirm.js, r=Mossop
toolkit/mozapps/extensions/test/browser/browser_select_confirm.js
--- a/toolkit/mozapps/extensions/test/browser/browser_select_confirm.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_select_confirm.js
@@ -106,39 +106,41 @@ function end_test() {
 // Test for disabling
 add_test(function disabling_test() {
   setupUI(false, false, function() {
     ok(gWin.document.getElementById("incompatible-list").hidden, "Incompatible list should be hidden");
     ok(gWin.document.getElementById("update-list").hidden, "Update list should be hidden");
 
     var list = gWin.document.getElementById("disable-list");
     ok(!list.hidden, "Disable list should be visible");
-    is(list.childNodes.length, 2, "Should be one add-on getting disabled (plus the header)");
-    is(list.childNodes[1].id, "test2@tests.mozilla.org", "Should be the right add-on ID");
-    is(list.childNodes[1].getAttribute("name"), "Test Add-on 2", "Should be the right add-on name");
+    // As of bug 1231784, mochikit and special-powers are temporary addons
+    // and therefore also getting disabled.
+    is(list.childNodes.length, 4, "Should be three add-ons getting disabled (plus the header)");
+    is(list.childNodes[3].id, "test2@tests.mozilla.org", "Should be the right add-on ID");
+    is(list.childNodes[3].getAttribute("name"), "Test Add-on 2", "Should be the right add-on name");
 
     var list = gWin.document.getElementById("enable-list");
     ok(!list.hidden, "Enable list should be visible");
-    is(list.childNodes.length, 2, "Should be one add-on getting disabled (plus the header)");
+    is(list.childNodes.length, 2, "Should be one add-on getting enabled (plus the header)");
     is(list.childNodes[1].id, "test3@tests.mozilla.org", "Should be the right add-on ID");
     is(list.childNodes[1].getAttribute("name"), "Test Add-on 3", "Should be the right add-on name");
 
     ok(gWin.document.getElementById("next").hidden, "Next button should be hidden");
     ok(!gWin.document.getElementById("done").hidden, "Done button should be visible");
     gWin.close();
 
     run_next_test();
   });
 });
 
 // Test for incompatible
 add_test(function incompatible_test() {
   setupUI(true, false, function() {
     ok(gWin.document.getElementById("update-list").hidden, "Update list should be hidden");
-    ok(gWin.document.getElementById("disable-list").hidden, "Disable list should be hidden");
+    ok(!gWin.document.getElementById("disable-list").hidden, "Disable list should be visible");
     ok(gWin.document.getElementById("enable-list").hidden, "Enable list should be hidden");
 
     var list = gWin.document.getElementById("incompatible-list");
     ok(!list.hidden, "Incompatible list should be visible");
     is(list.childNodes.length, 3, "Should be two add-ons waiting to be compatible (plus the header)");
     is(list.childNodes[1].id, "test1@tests.mozilla.org", "Should be the right add-on ID");
     is(list.childNodes[1].getAttribute("name"), "Test Add-on 1", "Should be the right add-on name");
     is(list.childNodes[2].id, "test3@tests.mozilla.org", "Should be the right add-on ID");
@@ -163,19 +165,21 @@ add_test(function update_test() {
     is(list.childNodes.length, 3, "Should be two add-ons waiting to be updated (plus the header)");
     is(list.childNodes[1].id, "test1@tests.mozilla.org", "Should be the right add-on ID");
     is(list.childNodes[1].getAttribute("name"), "Test Add-on 1", "Should be the right add-on name");
     is(list.childNodes[2].id, "test3@tests.mozilla.org", "Should be the right add-on ID");
     is(list.childNodes[2].getAttribute("name"), "Test Add-on 3", "Should be the right add-on name");
 
     list = gWin.document.getElementById("disable-list");
     ok(!list.hidden, "Disable list should be visible");
-    is(list.childNodes.length, 2, "Should be one add-on getting disabled (plus the header)");
-    is(list.childNodes[1].id, "test2@tests.mozilla.org", "Should be the right add-on ID");
-    is(list.childNodes[1].getAttribute("name"), "Test Add-on 2", "Should be the right add-on name");
+    // As of bug 1231784, mochikit and special-powers are temporary addons
+    // and therefore also getting disabled.
+    is(list.childNodes.length, 4, "Should be three add-ons getting disabled (plus the header)");
+    is(list.childNodes[3].id, "test2@tests.mozilla.org", "Should be the right add-on ID");
+    is(list.childNodes[3].getAttribute("name"), "Test Add-on 2", "Should be the right add-on name");
 
     ok(!gWin.document.getElementById("next").hidden, "Next button should be visible");
     ok(gWin.document.getElementById("done").hidden, "Done button should be hidden");
     gWin.close();
 
     run_next_test();
   });
 });