Bug 1374718 - removed strictContentSandbox mochitest option; r?bobowen draft
authorAlex Gaynor <agaynor@mozilla.com>
Tue, 20 Jun 2017 13:30:45 -0400
changeset 597596 125e839a197ecbc2341c109f147debb9ed72dda2
parent 597455 464b2a3c25aa1065760d9ecbb0870bca4a66c62e
child 634266 73b9f72a2f5029409477fdcc8763517907d3e8bc
push id64971
push userbmo:agaynor@mozilla.com
push dateTue, 20 Jun 2017 17:46:04 +0000
reviewersbobowen
bugs1374718
milestone56.0a1
Bug 1374718 - removed strictContentSandbox mochitest option; r?bobowen For a while now it has been making the content process sandbox less strict. MozReview-Commit-ID: Am6fGzViaLk
testing/mochitest/mochitest_options.py
testing/mochitest/runtests.py
testing/mozharness/scripts/desktop_unittest.py
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -434,23 +434,16 @@ class MochitestArguments(ArgumentContain
         [["--jscov-dir-prefix"],
          {"action": "store",
           "help": "Directory to store per-test line coverage data as json "
                   "(browser-chrome only). To emit lcov formatted data, set "
                   "JS_CODE_COVERAGE_OUTPUT_DIR in the environment.",
           "default": None,
           "suppress": True,
           }],
-        [["--strict-content-sandbox"],
-         {"action": "store_true",
-          "default": False,
-          "dest": "strictContentSandbox",
-          "help": "Run tests with a more strict content sandbox (Windows only).",
-          "suppress": not mozinfo.isWin,
-          }],
         [["--nested_oop"],
          {"action": "store_true",
           "default": False,
           "help": "Run tests with nested_oop preferences and test filtering enabled.",
           }],
         [["--dmd"],
          {"action": "store_true",
           "default": False,
@@ -624,18 +617,16 @@ class MochitestArguments(ArgumentContain
         # see https://bugzilla.mozilla.org/show_bug.cgi?id=916517
         # args.webSocketPort = DEFAULT_PORTS['ws']
     }
 
     def validate(self, parser, options, context):
         """Validate generic options."""
 
         # for test manifest parsing.
-        mozinfo.update({"strictContentSandbox": options.strictContentSandbox})
-        # for test manifest parsing.
         mozinfo.update({"nested_oop": options.nested_oop})
 
         # and android doesn't use 'app' the same way, so skip validation
         if parser.app != 'android':
             if options.app is None:
                 if build_obj:
                     options.app = build_obj.get_binary_path()
                 else:
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1740,18 +1740,16 @@ toolbar#nav-bar {
         if (mozinfo.info["asan"] or mozinfo.info["debug"]) and \
                 options.flavor == 'browser' and options.timeout is None:
             self.log.info("Increasing default timeout to 90 seconds")
             options.extraPrefs.append("testing.browserTestHarness.timeout=90")
 
         options.extraPrefs.append(
             "browser.tabs.remote.autostart=%s" %
             ('true' if options.e10s else 'false'))
-        if options.strictContentSandbox:
-            options.extraPrefs.append("security.sandbox.content.level=1")
         options.extraPrefs.append(
             "dom.ipc.tabs.nested.enabled=%s" %
             ('true' if options.nested_oop else 'false'))
 
         # get extensions to install
         extensions = self.getExtensionsToInstall(options)
 
         # preferences
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -117,22 +117,16 @@ class DesktopUnittest(TestingMixin, Merc
                     "any other suites.\nBeware, this may take a while ;)"}
          ],
         [['--e10s', ], {
             "action": "store_true",
             "dest": "e10s",
             "default": False,
             "help": "Run tests with multiple processes."}
          ],
-        [['--strict-content-sandbox', ], {
-            "action": "store_true",
-            "dest": "strict_content_sandbox",
-            "default": False,
-            "help": "Run tests with a more strict content sandbox (Windows only)."}
-         ],
         [['--no-random', ], {
             "action": "store_true",
             "dest": "no_random",
             "default": False,
             "help": "Run tests with no random intermittents and bisect in case of real failure."}
          ],
         [["--total-chunks"], {
             "action": "store",
@@ -383,22 +377,16 @@ class DesktopUnittest(TestingMixin, Merc
             if self.symbols_path:
                 str_format_values['symbols_path'] = self.symbols_path
 
             if suite_category in SUITE_DEFAULT_E10S and not c['e10s']:
                 base_cmd.append('--disable-e10s')
             elif suite_category not in SUITE_DEFAULT_E10S and c['e10s']:
                 base_cmd.append('--e10s')
 
-            if c.get('strict_content_sandbox'):
-                if suite_category == "mochitest":
-                    base_cmd.append('--strict-content-sandbox')
-                else:
-                    self.fatal("--strict-content-sandbox only works with mochitest suites.")
-
             if c.get('total_chunks') and c.get('this_chunk'):
                 base_cmd.extend(['--total-chunks', c['total_chunks'],
                                  '--this-chunk', c['this_chunk']])
 
             if c['no_random']:
                 if suite_category == "mochitest":
                     base_cmd.append('--bisect-chunk=default')
                 else: