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

Unified Diff: tools/perf/benchmarks/blink_perf_unittest.py

Issue 2864363006: Add smoke test coverage for tracing metrics of measurePageLoad method (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/PerformanceTests/TestData/simple-html-measure-page-load-time.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/blink_perf_unittest.py
diff --git a/tools/perf/benchmarks/blink_perf_unittest.py b/tools/perf/benchmarks/blink_perf_unittest.py
index a8ffaf66cffc98960b724d363b7c730f536dd12a..5d45a0530f76100f880cff9522f9fcc14d61b824 100644
--- a/tools/perf/benchmarks/blink_perf_unittest.py
+++ b/tools/perf/benchmarks/blink_perf_unittest.py
@@ -82,6 +82,29 @@ class BlinkPerfTest(page_test_test_case.PageTestTestCase):
self.assertEquals(len(frame_view_painttrees[0].values), 9)
self.assertGreater(frame_view_painttrees[0].GetRepresentativeNumber, 0.1)
+ def testBlinkPerfTracingMetricsForMeasurePageLoadTime(self):
+ results = self.RunMeasurement(measurement=self._measurement,
+ ps=self._CreateStorySetForTestFile(
+ 'simple-html-measure-page-load-time.html'),
+ options=self._options)
+ self.assertFalse(results.failures)
+ self.assertEquals(len(results.FindAllTraceValues()), 1)
+
+ create_child_frame = results.FindAllPageSpecificValuesNamed(
+ 'WebLocalFrameImpl::createChildframe')
+ self.assertEquals(len(create_child_frame), 1)
+ # color-changes-measure-frame-time.html specifies 7 iterationCount.
+ self.assertEquals(len(create_child_frame[0].values), 7)
+ self.assertGreater(create_child_frame[0].GetRepresentativeNumber, 0.1)
+
+ post_layout_task = results.FindAllPageSpecificValuesNamed(
+ 'FrameView::performPostLayoutTasks')
+ self.assertEquals(len(post_layout_task), 1)
+ # color-changes-measure-frame-time.html specifies 7 iterationCount.
+ self.assertEquals(len(post_layout_task[0].values), 7)
+ self.assertGreater(post_layout_task[0].GetRepresentativeNumber, 0.1)
+
+
def testBlinkPerfTracingMetricsForMeasureAsync(self):
results = self.RunMeasurement(measurement=self._measurement,
ps=self._CreateStorySetForTestFile(
« no previous file with comments | « third_party/WebKit/PerformanceTests/TestData/simple-html-measure-page-load-time.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698