Index: tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py |
diff --git a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py b/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py |
index 488b28fece8cbf8bb0c89faad24059c277e0eb85..27c585a3d9b1537475268cbe182b3c4b6b393ffa 100644 |
--- a/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py |
+++ b/tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py |
@@ -16,9 +16,20 @@ class BenchThatHasDefaults(multi_page_benchmark.MultiPageBenchmark): |
assert self.options.x == 3 |
return {'x': 7} |
+class BenchForBlank(multi_page_benchmark.MultiPageBenchmark): |
+ def MeasurePage(self, page, tab): |
+ contents = tab.runtime.Evaluate('document.body.textContent') |
+ assert contents.strip() == 'Hello world' |
+ |
class MultiPageBenchmarkUnitTest( |
multi_page_benchmark_unittest_base.MultiPageBenchmarkUnitTestBase): |
+ def testGotToBlank(self): |
+ ps = self.CreatePageSetFromFileInUnittestDataDir('blank.html') |
+ benchmark = BenchForBlank() |
+ all_results = self.RunBenchmark(benchmark, ps) |
+ self.assertEquals(0, len(all_results.page_failures)) |
+ |
def testFailure(self): |
ps = self.CreatePageSetFromFileInUnittestDataDir('blank.html') |
benchmark = BenchThatFails() |