Index: tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest_base.py |
diff --git a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest_base.py b/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest_base.py |
deleted file mode 100644 |
index 873829df00f343e824a616a6e811c40114b5b77f..0000000000000000000000000000000000000000 |
--- a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest_base.py |
+++ /dev/null |
@@ -1,49 +0,0 @@ |
-# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
-# Use of this source code is governed by a BSD-style license that can be |
-# found in the LICENSE file. |
-import os |
-import unittest |
- |
-from chrome_remote_control import browser_finder |
-from chrome_remote_control import multi_page_benchmark |
-from chrome_remote_control import options_for_unittests |
-from chrome_remote_control import page_runner |
-from chrome_remote_control import page as page_module |
-from chrome_remote_control import page_set |
- |
-class MultiPageBenchmarkUnitTestBase(unittest.TestCase): |
- """unittest.TestCase-derived class to help in the construction of unit tests |
- for a benchmark.""" |
- |
- def CreatePageSetFromFileInUnittestDataDir(self, test_filename): |
- base_dir = os.path.dirname(__file__) |
- page = page_module.Page(os.path.join('..', 'unittest_data', test_filename), |
- base_dir=base_dir) |
- ps = page_set.PageSet(base_dir=base_dir) |
- ps.pages.append(page) |
- return ps |
- |
- def CustomizeOptionsForTest(self, options): |
- """Override to customize default options.""" |
- pass |
- |
- def RunBenchmark(self, benchmark, ps): |
- """Runs a benchmark against a pageset, returning the rows its outputs.""" |
- options = options_for_unittests.Get() |
- assert options |
- temp_parser = options.CreateParser() |
- benchmark.AddOptions(temp_parser) |
- defaults = temp_parser.get_default_values() |
- for k, v in defaults.__dict__.items(): |
- if hasattr(options, k): |
- continue |
- setattr(options, k, v) |
- |
- benchmark.CustomizeBrowserOptions(options) |
- self.CustomizeOptionsForTest(options) |
- possible_browser = browser_finder.FindBrowser(options) |
- |
- results = multi_page_benchmark.BenchmarkResults() |
- with page_runner.PageRunner(ps) as runner: |
- runner.Run(options, possible_browser, benchmark, results) |
- return results |