Backed out changeset fa1106f5c110 - I put in the wrong bug number.
authorMike Conley <mconley@mozilla.com>
Wed, 27 Mar 2013 10:55:25 -0400
changeset 15215 c970723214c6a044a44bf789acfbfcc363bfcbae
parent 15214 fa1106f5c1108c1bf981af014f0f831975e9b8ab
child 15216 4da3cfc1e642a7cbb599668de5ac0b14a88b7114
push id898
push userbugzilla@standard8.plus.com
push dateMon, 13 May 2013 17:03:31 +0000
treeherdercomm-beta@3106694b14de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
backs outfa1106f5c1108c1bf981af014f0f831975e9b8ab
Backed out changeset fa1106f5c110 - I put in the wrong bug number.
calendar/test/mozmill/Makefile.in
mail/test/mozmill/content-tabs/html/plugin.html
mail/test/mozmill/content-tabs/test-plugin-crashing.js
mail/test/mozmill/runtest.py
mail/test/mozmill/runtestlist.py
mail/testsuite-targets.mk
--- a/calendar/test/mozmill/Makefile.in
+++ b/calendar/test/mozmill/Makefile.in
@@ -49,21 +49,19 @@ mozmill-stage: $(MOZMILL_SHARED)
 	$(INSTALL) $(wildcard $(srcdir)/shared-modules/*.js) $(MOZMILL_STAGE_SHARED)
 
 mozmill: mozmill-stage
 	unset PYTHONHOME && cd $(MOZMILLDIR) && unset MACOSX_DEPLOYMENT_TARGET && \
 	$(MOZMILLPYTHON) runtestlist.py --list=$(srcdir)/mozmilltests.list \
 	--binary=$(MOZMILLPROGRAM) \
 	--dir=$(call core_abspath,$(MOZMILLDIR))/stage \
 	--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
-	--plugins-path=$(call core_abspath,$(DIST)/plugins) \
 	$(MOZMILL_EXTRA)
 
 mozmill-one: solo-test = $(find-solo-test)
 mozmill-one: mozmill-stage
 	unset PYTHONHOME && cd $(MOZMILLDIR) && unset MACOSX_DEPLOYMENT_TARGET && \
 	$(MOZMILLPYTHON) runtest.py \
 	--test=$(call core_abspath,$(MOZMILLDIR))/stage/$(solo-test) \
 	--binary=$(MOZMILLPROGRAM) \
 	--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
-	--plugins-path=$(call core_abspath,$(DIST)/plugins) \
 	$(MOZMILL_EXTRA)
 
--- a/mail/test/mozmill/content-tabs/html/plugin.html
+++ b/mail/test/mozmill/content-tabs/html/plugin.html
@@ -1,9 +1,9 @@
 <html>
   <head>
     <title>Plugin Test</title>
   </head>
   <body bgcolor="#FFFFFF">
     <h1>Plugin Test</h1>
-    <embed id="test-plugin" type="application/x-test" width="500" height="500"></embed>
+    <embed id="test-plugin" type="application/x-test" width="200" height="200"></embed>
   </body>
 </html>
--- a/mail/test/mozmill/content-tabs/test-plugin-crashing.js
+++ b/mail/test/mozmill/content-tabs/test-plugin-crashing.js
@@ -15,17 +15,16 @@ var elib = {};
 Components.utils.import('resource://mozmill/modules/elementslib.js', elib);
 
 Components.utils.import('resource://gre/modules/Services.jsm');
 
 var gContentWindow = null;
 var gJSObject = null;
 var gTabDoc = null;
 var gOldStartPage = null;
-let gOldCrashReporterEnabled = null;
 
 const kPluginId = "test-plugin";
 const kStartPagePref = "mailnews.start_page.override_url";
 const kPluginCrashDocPref = "plugins.crash.supportUrl";
 // RELATIVE_ROOT messes with the collector, so we have to bring the path back
 // so we get the right path for the resources.
 const kUrl = collector.addHttpResource('../content-tabs/html', '');
 const kPluginUrl = kUrl + "plugin.html";
@@ -46,23 +45,16 @@ function setupModule(module) {
   Services.prefs.setCharPref(kPluginCrashDocPref, kPluginCrashDocUrl);
 
   let Cc = Components.classes;
   let Ci = Components.interfaces;
 
   let crashReporter = Cc["@mozilla.org/toolkit/crash-reporter;1"]
                         .getService(Ci.nsICrashReporter);
 
-  // Force the crash reporter to be enabled, but record its old setting.
-  gOldCrashReporterEnabled = crashReporter.enabled;
-
-  if (!crashReporter.enabled) {
-    crashReporter.enabled = true;
-  }
-
   /* Bug 689580 - these crash tests fail randomly on 64-bit OSX.  We'll
    * disable them for now, until we can figure out what's going on.
    */
   Components.utils.import("resource://gre/modules/Services.jsm");
   let is64BitOSX = (mc.mozmillModule.isMac &&
                     Services.appinfo.XPCOMABI.contains("x86_64-"));
 
   // These tests are no good if the crash reporter is disabled, or if
@@ -76,21 +68,16 @@ function setupModule(module) {
 
     funcsToSkip.forEach(function(func) {
       func.__force_skip__ = true;
     });
   }
 };
 
 function teardownModule(module) {
-  let crashReporter = Cc["@mozilla.org/toolkit/crash-reporter;1"]
-                        .getService(Ci.nsICrashReporter);
-
-  crashReporter.enabled = gOldCrashReporterEnabled;
-
   Services.prefs.setCharPref(kStartPagePref, gOldStartPage);
   Services.prefs.setCharPref(kPluginCrashDocPref, gOldPluginCrashDocPage);
 }
 
 function setupTest() {
   let tab = open_content_tab_with_click(mc.menus.helpMenu.whatsNew, kPluginUrl);
   assert_tab_has_title(tab, "Plugin Test");
 
@@ -207,19 +194,18 @@ function test_crashed_plugin_notificatio
 }
 
 /* Test that if a plugin crashes, and the plugin's <object>
  * is large enough to display a message, it'll display the
  * appropriate crash message.
  */
 function test_crashed_plugin_notification_inline() {
   let plugin = gTabDoc.getElementById(kPluginId);
-
-  plugin.style.width = '500px';
-  plugin.style.height = '500px';
+  plugin.style.width = '200px';
+  plugin.style.height = '200px';
 
   assert_true(crash_plugin());
 
   /* This function attempts to return the status div on the
    * crashed plugin widget.  Returns null on failure.
    */
   function getStatusDiv() {
     let submitDiv = gContentWindow.document
@@ -236,20 +222,18 @@ function test_crashed_plugin_notificatio
   mc.waitFor(function() (getStatusDiv() != null),
              "Timed out waiting for plugin status div to appear");
 
   let submitDiv = getStatusDiv();
 
   // Depending on the environment we're running this test on,
   // the status attribute might be "noReport" or "please".
   let statusString = submitDiv.getAttribute("status");
-
   assert_true(statusString == "noReport" || statusString == "please",
-              "Expected the status to be \"noReport\" or \"please\". " +
-              "Instead, it was " + statusString);
+              "Expected the status to be \"noReport\" or \"please\"");
 
   // Make sure that the help link in the inline notification works.
   let helpIcon = gContentWindow.document
                                .getAnonymousElementByAttribute(plugin,
                                                                "class",
                                                                "helpIcon");
   assert_not_equals(null, helpIcon, "Help Icon should have been available");
 
--- a/mail/test/mozmill/runtest.py
+++ b/mail/test/mozmill/runtest.py
@@ -46,17 +46,16 @@ except:
     import mozcrash
 # ---------------------------------------------------------------
 
 from time import sleep
 import imp
 
 PROFILE_DIR = os.path.join(SCRIPT_DIRECTORY, 'mozmillprofile')
 SYMBOLS_PATH = None
-PLUGINS_PATH = None
 # XXX This breaks any semblance of test runner modularity, and only works
 # because we know that we run MozMill only once per process. This needs to be
 # fixed if that ever changes.
 TEST_NAME = None
 
 # The name of the (optional) module that tests can define as a wrapper (e.g. to
 # run before Thunderbird is started)
 WRAPPER_MODULE_NAME = "wrapper"
@@ -205,23 +204,16 @@ class ThunderTestProfile(mozrunner.Thund
         # create a clean directory
         if os.path.exists(PROFILE_DIR):
             shutil.rmtree(PROFILE_DIR, onerror=rmtree_onerror)
         os.makedirs(PROFILE_DIR)
         print 'Using profile dir:', PROFILE_DIR
         if not os.path.exists(PROFILE_DIR):
             raise Exception('somehow failed to create profile dir!')
 
-        if PLUGINS_PATH:
-          if not os.path.exists(PLUGINS_PATH):
-            raise Exception('Plugins path "%s" does not exist.' % PLUGINS_PATH)
-
-          dest = os.path.join(PROFILE_DIR, "plugins")
-          shutil.copytree(PLUGINS_PATH, dest)
-
         if wrapper is not None and hasattr(wrapper, "on_profile_created"):
             # It's a little dangerous to allow on_profile_created access to the
             # profile object, because it isn't fully initalized yet
             wrapper.on_profile_created(PROFILE_DIR)
 
         if (wrapper is not None and hasattr(wrapper, "NO_ACCOUNTS")
             and wrapper.NO_ACCOUNTS):
             pass
@@ -335,35 +327,32 @@ if hasattr(mozmill.MozMill, 'find_tests'
 
 class ThunderTestCLI(mozmill.CLI):
 
     profile_class = ThunderTestProfile
     runner_class = ThunderTestRunner
     parser_options = copy.copy(mozmill.CLI.parser_options)
     parser_options[('--symbols-path',)] = {"default": None, "dest": "symbols",
                                            "help": "The path to the symbol files from build_symbols"}
-    parser_options[('--plugins-path',)] = {"default": None, "dest": "plugins",
-                                           "help": "The path to the plugins directory for the created profile"}
 
     def __init__(self, *args, **kwargs):
-        global SYMBOLS_PATH, PLUGINS_PATH, TEST_NAME
+        global SYMBOLS_PATH, TEST_NAME
 
         # mozmill 1.5.4 still explicitly hardcodes references to Firefox; in
         # order to avoid missing out on initializer logic or needing to copy
         # it, we monkeypatch mozmill's view of mozrunner.  (Keep in mind that
         # the python module import process shallow copies dictionaries...)
         mozmill.mozrunner.FirefoxRunner = self.runner_class
         mozmill.mozrunner.FirefoxProfile = self.profile_class
 
         # note: we previously hardcoded a JS bridge timeout of 300 seconds,
         # but the default is now 60 seconds...
         mozmill.CLI.__init__(self, *args, **kwargs)
 
         SYMBOLS_PATH = self.options.symbols
-        PLUGINS_PATH = self.options.plugins
         if isinstance(self.options.test, basestring):
             test_paths = [self.options.test]
         else:
             test_paths = self.options.test
         TEST_NAME = ', '.join([os.path.basename(t) for t in test_paths])
 
         test_dirs = self.test_dirs = []
         for test_file in test_paths:
--- a/mail/test/mozmill/runtestlist.py
+++ b/mail/test/mozmill/runtestlist.py
@@ -33,20 +33,16 @@ class RunTestListOptions(optparse.Option
                         help = "Directory of the tests, leave blank for current directory")
         defaults["dir"] = ""
 
         self.add_option("--symbols-path",
                         action = "store", type = "string", dest = "symbols",
                         help = "The path to the symbol files from build_symbols")
         defaults["symbols"] = ""
 
-        self.add_option("--plugins-path",
-                        action = "store", type = "string", dest = "plugins",
-                        help = "The path to the plugins folder for the test profiles")
-
         self.set_defaults(**defaults);
 
         usage = """\
 Usage instructions for runtestlist.py
 """
         self.set_usage(usage)
 
 log = logging.getLogger()
@@ -70,21 +66,16 @@ for directory in f:
     log.info("INFO | (runtestlist.py) | Running directory: %s",
              directory.rstrip())
     if options.dir != "":
         testDirectory = os.path.join(options.dir, directory.rstrip())
     else:
         testDirectory = directory.rstrip()
     args = [sys.executable, "runtest.py", "-t", testDirectory,
             "--binary", options.binary, "--symbols-path", options.symbols]
-
-    if options.plugins:
-        args.append("--plugins-path")
-        args.append(options.plugins)
-
     print args
     outputPipe = subprocess.PIPE
 
     proc = subprocess.Popen(args, cwd=SCRIPT_DIRECTORY, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
 
     testErrors = 0
     testPasses = 0
 
--- a/mail/testsuite-targets.mk
+++ b/mail/testsuite-targets.mk
@@ -33,27 +33,25 @@ find-solo-test = $(if $(and $(SOLO_TEST)
 # PYTHONHOME messes very badly with virtualenv setups, so unset it.
 mozmill:
 	$(call check-no-solo,SOLOVAR is specified. Perhaps you meant mozmill-one.)
 	unset PYTHONHOME && cd $(MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET= \
 	$(MOZMILLPYTHON) runtestlist.py --list=mozmilltests.list \
 	--binary=$(PROGRAM) \
 	--dir=$(call core_abspath,$(topsrcdir))/mail/test/mozmill \
 	--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
-	--plugins-path=$(call core_abspath,$(DIST)/plugins) \
 	$(MOZMILL_EXTRA)
 
 mozmill-one: solo-test = $(find-solo-test)
 mozmill-one:
 	unset PYTHONHOME && cd $(MOZMILLDIR) && MACOSX_DEPLOYMENT_TARGET= \
 	$(MOZMILLPYTHON) runtest.py \
 	--test=$(call core_abspath,$(topsrcdir))/mail/test/mozmill/$(solo-test) \
 	--binary=$(PROGRAM) \
 	--symbols-path=$(call core_abspath,$(DIST)/crashreporter-symbols) \
-	--plugins-path=$(call core_abspath,$(DIST)/plugins) \
 	$(MOZMILL_EXTRA)
 
 # XXX The mozilla/testing/testsuite-targets.mk doesn't really allow for hooks
 # outside of itself. Therefore we replicate the functionality we need here,
 # calling into the relevant mozilla dirs when necessary for the core tests.
 ifndef UNIVERSAL_BINARY
 PKG_STAGE = $(DIST)/test-package-stage
 package-tests:: stage-mozilla-tests stage-mozmill stage-modules