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

Unified Diff: telemetry/telemetry/internal/actions/page_action.py

Issue 2876843002: Simulate interactivity boost for simulated user input events
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 | « telemetry/telemetry/internal/actions/mouse_click.py ('k') | telemetry/telemetry/internal/actions/pinch.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/actions/page_action.py
diff --git a/telemetry/telemetry/internal/actions/page_action.py b/telemetry/telemetry/internal/actions/page_action.py
index d85d47aac75efc9757cf0b319f13577becd43f67..cb392e3b157293fb2eb8690588999c315e9af6f4 100644
--- a/telemetry/telemetry/internal/actions/page_action.py
+++ b/telemetry/telemetry/internal/actions/page_action.py
@@ -27,6 +27,16 @@ class PageAction(object):
__metaclass__ = trace_event.TracedMetaClass
+ def SimulatesUserInput(self):
+ """On some platforms (e.g. ChromeOS), the kernel provides a frequency boost
+ to the CPUs when an input is received (e.g., keypress, touchpad event).
+ Page actions which simulate a user input therefore need to trigger the
+ same boost in order to accurately simulate normal behaviour.
+
+ This should be overridden by actions which simulate user input.
+ """
+ return False
+
def WillRunAction(self, tab):
"""Override to do action-specific setup before
Test.WillRunAction is called."""
« no previous file with comments | « telemetry/telemetry/internal/actions/mouse_click.py ('k') | telemetry/telemetry/internal/actions/pinch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698