Commit 04f49895 authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

[perf] fix Google Docs loading story

Google Docs loading story doesn't produce any metrics due to configuration errors.

This CL re-uses the interactive event which is common across GSuite products.

R=johnchen@chromium.org,ulan@chromium.org

Bug: 1044682
Change-Id: I8979fec52b4365bf6b908485f11725bfba4f0477
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2266961
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Reviewed-by: default avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782649}
parent 369798c4
......@@ -1305,7 +1305,7 @@ class GoogleDocsDesktopScrollingStory(system_health_story.SystemHealthStory):
'ccv':
'telemetry:reported_by_page:viewable',
'fcoe':
'telemetry:reported_by_page:editable',
'telemetry:reported_by_page:interactive',
};
'''
......@@ -1328,10 +1328,11 @@ class GoogleDocsDesktopScrollingStory(system_health_story.SystemHealthStory):
'''
# Page event queries.
EDITABLE_EVENT = '''
INTERACTIVE_EVENT = '''
(window.__telemetry_observed_page_events.has(
"telemetry:reported_by_page:editable"))
"telemetry:reported_by_page:interactive"))
'''
CLEAR_EVENTS = 'window.__telemetry_observed_page_events.clear()'
def __init__(self, story_set, take_memory_measurement):
super(GoogleDocsDesktopScrollingStory, self).__init__(
......@@ -1344,8 +1345,9 @@ class GoogleDocsDesktopScrollingStory(system_health_story.SystemHealthStory):
def _DidLoadDocument(self, action_runner):
# Wait for load.
action_runner.WaitForJavaScriptCondition(self.EDITABLE_EVENT)
action_runner.Wait(10)
action_runner.WaitForJavaScriptCondition(self.INTERACTIVE_EVENT)
action_runner.Wait(5)
action_runner.EvaluateJavaScript(self.CLEAR_EVENTS)
# Scroll through the document.
action_runner.RepeatableBrowserDrivenScroll(
x_scroll_distance_ratio=0.0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment