Backout of changeset e30ee0ae39b6 from bug 610661 due to test failures. a=bustage
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 11 Jan 2011 10:49:02 -0800
changeset 60311 56bbebc9d205fa27bd870f39f0377d568daff676
parent 60310 96e6dccb0ea2b5551680eb1e4e35749a7da21597
child 60312 eab687bc329f1072e9153eff446d3cfa14ca3c19
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs610661
milestone2.0b10pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout of changeset e30ee0ae39b6 from bug 610661 due to test failures. a=bustage
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/test/browser/Makefile.in
toolkit/mozapps/extensions/test/browser/addon_about.xul
toolkit/mozapps/extensions/test/browser/browser_about.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -882,17 +882,17 @@ var gViewController = {
     cmd_showItemAbout: {
       isEnabled: function(aAddon) {
         // XXXunf This may be applicable to install items too. See bug 561260
         return !!aAddon;
       },
       doCommand: function(aAddon) {
         var aboutURL = aAddon.aboutURL;
         if (aboutURL)
-          openDialog(aboutURL, "", "chrome,centerscreen,modal", aAddon);
+          openDialog(aboutURL, "", "chrome,centerscreen,modal");
         else
           openDialog("chrome://mozapps/content/extensions/about.xul",
                      "", "chrome,centerscreen,modal", aAddon);
       }
     },
 
     cmd_enableItem: {
       isEnabled: function(aAddon) {
--- a/toolkit/mozapps/extensions/test/browser/Makefile.in
+++ b/toolkit/mozapps/extensions/test/browser/Makefile.in
@@ -42,17 +42,16 @@ VPATH = @srcdir@
 relativesrcdir  = toolkit/mozapps/extensions/test/browser
 ADDONSRC = $(srcdir)/addons
 TESTXPI = $(CURDIR)/$(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)/addons
 
 include $(DEPTH)/config/autoconf.mk
 
 _MAIN_TEST_FILES = \
   head.js \
-  browser_about.js \
   browser_bug557943.js \
   browser_bug562797.js \
   browser_bug562854.js \
   browser_bug562890.js \
   browser_bug562899.js \
   browser_bug562992.js \
   browser_bug567127.js \
   browser_bug567137.js \
@@ -86,17 +85,16 @@ include $(DEPTH)/config/autoconf.mk
 _TEST_FILES = \
   head.js \
   browser_bug557956.js \
   browser_updatessl.js \
   browser_installssl.js \
   $(NULL)
 
 _TEST_RESOURCES = \
-  addon_about.xul \
   addon_prefs.xul \
   browser_bug557956.rdf \
   browser_bug557956_8_2.xpi \
   browser_bug557956_9_2.xpi \
   browser_bug591465.xml \
   browser_bug593535.xml \
   browser_searching.xml \
   browser_searching_empty.xml \
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/addon_about.xul
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        id="addon-test-about-window">
-  <label value="Oh hai!"/>
-</window>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/browser/browser_about.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Tests the default and custom "about" dialogs of add-ons.
- *
- * Test for bug 610661 <https://bugzilla.mozilla.org/show_bug.cgi?id=610661>:
- * Addon object not passed to custom about dialogs.
- */
-
-var gManagerWindow;
-
-const URI_ABOUT_DEFAULT = "chrome://mozapps/content/extensions/about.xul";
-const URI_ABOUT_CUSTOM = CHROMEROOT + "addon_about.xul";
-
-function test() {
-  requestLongerTimeout(2);
-
-  waitForExplicitFinish();
-
-  var gProvider = new MockProvider();
-  gProvider.createAddons([{
-    id: "test1@tests.mozilla.org",
-    name: "Test add-on 1",
-    description: "foo"
-  },
-  {
-    id: "test2@tests.mozilla.org",
-    name: "Test add-on 2",
-    description: "bar",
-    aboutURL: URI_ABOUT_CUSTOM
-  }]);
-
-  open_manager("addons://list/extension", function(aManager) {
-    gManagerWindow = aManager;
-
-    test_about_window("Test add-on 1", URI_ABOUT_DEFAULT, function() {
-      test_about_window("Test add-on 2", URI_ABOUT_CUSTOM, function() {
-        close_manager(gManagerWindow, finish);
-      });
-    });
-  });
-}
-
-function test_about_window(aAddonItemName, aExpectedAboutUri, aCallback) {
-  var addonList = gManagerWindow.document.getElementById("addon-list");
-  for (var i = 0; i < addonList.childNodes.length; i++) {
-    var addonItem = addonList.childNodes[i];
-    if (addonItem.hasAttribute("name") &&
-        addonItem.getAttribute("name") === aAddonItemName)
-      break;
-  }
-
-  Services.ww.registerNotification(function TEST_ww_observer(aSubject, aTopic,
-                                                             aData) {
-    if (aTopic == "domwindowclosed") {
-      Services.ww.unregisterNotification(TEST_ww_observer);
-      // Give the window a chance to finish closing before continuing.
-      executeSoon(aCallback);
-    } else if (aTopic == "domwindowopened") {
-      let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-      win.addEventListener("load", function TEST_ww_onLoad() {
-
-        is(win.location,
-           aExpectedAboutUri,
-           "The correct add-on about window should have opened");
-
-        is(win.arguments && win.arguments[0] && win.arguments[0].name,
-           aAddonItemName,
-           "window.arguments[0] should refer to the add-on object");
-
-        win.removeEventListener("load", TEST_ww_onLoad, false);
-        win.close();
-      }, false);
-    }
-  });
-
-  gManagerWindow.gViewController.doCommand("cmd_showItemAbout",
-                                           addonItem.mAddon);
-}