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

Unified Diff: telemetry/telemetry/internal/actions/action_runner.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 | « no previous file | telemetry/telemetry/internal/actions/drag.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/actions/action_runner.py
diff --git a/telemetry/telemetry/internal/actions/action_runner.py b/telemetry/telemetry/internal/actions/action_runner.py
index ec2a5eac8e28db8da31ed2c215a0baed16a7f38d..cfceb44bf302bd2f2acbd9d54a1eebec3db1a23c 100644
--- a/telemetry/telemetry/internal/actions/action_runner.py
+++ b/telemetry/telemetry/internal/actions/action_runner.py
@@ -52,8 +52,14 @@ class ActionRunner(object):
return self._tab
def _RunAction(self, action):
- action.WillRunAction(self._tab)
- action.RunAction(self._tab)
+ try:
+ if action.SimulatesUserInput():
+ self._tab.browser.SetInteractivityBoost(True)
+ action.WillRunAction(self._tab)
+ action.RunAction(self._tab)
+ finally:
+ if action.SimulatesUserInput():
+ self._tab.browser.SetInteractivityBoost(False)
def CreateInteraction(self, label, repeatable=False):
""" Create an action.Interaction object that issues interaction record.
« no previous file with comments | « no previous file | telemetry/telemetry/internal/actions/drag.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698