Index: tools/perf/page_sets/system_health/blank_stories.py |
diff --git a/tools/perf/page_sets/system_health/blank_stories.py b/tools/perf/page_sets/system_health/blank_stories.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..08f649090694918946178851b440003cf85646c0 |
--- /dev/null |
+++ b/tools/perf/page_sets/system_health/blank_stories.py |
@@ -0,0 +1,28 @@ |
+# Copyright 2016 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. |
+ |
+from page_sets.system_health import system_health_story |
+ |
+ |
+class _BlankStory(system_health_story.SystemHealthStory): |
petrcermak
2016/09/08 11:33:17
There's no point in splitting the story into two c
mikecase (-- gone --)
2016/09/08 16:51:49
Done
|
+ """Abstract base class for blank page stories.""" |
+ ABSTRACT_STORY = True |
+ |
+ def _DidLoadDocument(self, action_runner): |
+ # Request a RAF and wait for it to be processed to ensure that the metric |
petrcermak
2016/09/08 11:33:17
I don't think you need this. The stories wait for
mikecase (-- gone --)
2016/09/08 16:51:49
Ack
|
+ # Startup.FirstWebContents.NonEmptyPaint2 is recorded. |
+ action_runner.ExecuteJavaScript( |
+ """ |
petrcermak
2016/09/08 11:33:17
If you do want to keep this code, than:
* s/hasRu
mikecase (-- gone --)
2016/09/08 16:51:49
Done, Done, Done, Done, Done
|
+ this.hasRunRAF = 0; |
+ requestAnimationFrame(function() { |
+ this.hasRunRAF = 1; |
+ }); |
+ """ |
+ ) |
+ action_runner.WaitForJavaScriptCondition("this.hasRunRAF == 1") |
+ |
+ |
+class BlankStoryAboutBlank(_BlankStory): |
petrcermak
2016/09/08 11:33:17
nit: BlankAboutBlankStory (the last word should be
mikecase (-- gone --)
2016/09/08 16:51:49
Done
|
+ NAME = 'blank:about:blank' |
+ URL = 'about:blank' |