| OLD | NEW |
| (Empty) |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from page_sets.system_health import system_health_story | |
| 6 | |
| 7 | |
| 8 class BlankAboutBlankStory(system_health_story.SystemHealthStory): | |
| 9 """Story that loads the about:blank page.""" | |
| 10 | |
| 11 NAME = 'blank:about:blank' | |
| 12 URL = 'about:blank' | |
| 13 | |
| 14 def _DidLoadDocument(self, action_runner): | |
| 15 # Request a RAF and wait for it to be processed to ensure that the metric | |
| 16 # Startup.FirstWebContents.NonEmptyPaint2 is recorded. | |
| 17 action_runner.ExecuteJavaScript( | |
| 18 """ | |
| 19 window.__hasRunRAF = false; | |
| 20 requestAnimationFrame(function() { | |
| 21 window.__hasRunRAF = true; | |
| 22 }); | |
| 23 """ | |
| 24 ) | |
| 25 action_runner.WaitForJavaScriptCondition("window.__hasRunRAF") | |
| OLD | NEW |