Commit 1e9ceb73 authored by Leonard Ge's avatar Leonard Ge Committed by Commit Bot

Integrate `testVarationArgsCompatibilityMode` Into `testVarationArgs`

This CL tries to fix the test failure introduced by testVarationArgsCompatibi-
lityMode. We replaced the hardcoded number with a reliable check of the exact
arguments added. This CL mimcs the change in CL:1151447.

Bug: 869602
Cq-Include-Trybots: master.tryserver.chromium.perf:obbs_fyi
Change-Id: I79579ae403066a410b477920a7fd1e29777aaf8a
Reviewed-on: https://chromium-review.googlesource.com/1158229Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Leonard Ge <wangge@google.com>
Cr-Commit-Position: refs/heads/master@{#579758}
parent f4fe0fd4
...@@ -90,15 +90,15 @@ class PerfBenchmarkTest(unittest.TestCase): ...@@ -90,15 +90,15 @@ class PerfBenchmarkTest(unittest.TestCase):
for arg in expected_args: for arg in expected_args:
self.assertNotIn(arg, options.browser_options.extra_browser_args) self.assertNotIn(arg, options.browser_options.extra_browser_args)
def testVariationArgsCompatibilityMode(self): # Test compatibility mode, which has no variation params applied by default.
benchmark = perf_benchmark.PerfBenchmark() benchmark = perf_benchmark.PerfBenchmark()
options = options_for_unittests.GetCopy() options = options_for_unittests.GetCopy()
options.chrome_root = self._output_dir
options.browser_options.compatibility_mode = True options.browser_options.compatibility_mode = True
benchmark.CustomizeBrowserOptions(options.browser_options) benchmark.CustomizeBrowserOptions(options.browser_options)
extra_args = options.browser_options.extra_browser_args for arg in expected_args:
feature_args = [a for a in extra_args if a.startswith('--enable-features')] self.assertNotIn(arg, options.browser_options.extra_browser_args)
self.assertEqual(0, len(feature_args))
def testNoAdTaggingRuleset(self): def testNoAdTaggingRuleset(self):
benchmark = perf_benchmark.PerfBenchmark() benchmark = perf_benchmark.PerfBenchmark()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment