Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: tools/chrome_remote_control/chrome_remote_control/multi_page_benchmark_unittest.py

Issue 10984018: [chrome_remote_control] Add pylint to PRESUMMIT and fix lint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()

Powered by Google App Engine
This is Rietveld 408576698