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

Unified Diff: tools/telemetry/telemetry/page/record_wpr.py

Issue 138643002: [Telemetry] Make record_wpr call test.WillNavigateToPage and test.DidNavigateToPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/record_wpr.py
diff --git a/tools/telemetry/telemetry/page/record_wpr.py b/tools/telemetry/telemetry/page/record_wpr.py
index 290d0fa7855bf916d21892ac8c069354d1846d50..bbd08a9e4e041ba459f595cfbcf3cf50aef221b3 100755
--- a/tools/telemetry/telemetry/page/record_wpr.py
+++ b/tools/telemetry/telemetry/page/record_wpr.py
@@ -44,9 +44,16 @@ class RecordPage(page_test.PageTest):
for action in compound_action:
action.CustomizeBrowserOptionsForPageSet(options)
- def WillNavigateToPage(self, _, tab):
+ def WillNavigateToPage(self, page, tab):
"""Override to ensure all resources are fetched from network."""
tab.ClearCache()
+ if self.test:
+ self.test.WillNavigateToPage(page, tab)
+
+ def DidNavigateToPage(self, page, tab):
+ """Forward the call to the test."""
+ if self.test:
+ self.test.DidNavigateToPage(page, tab)
def Run(self, options, page, tab, results):
# When recording, sleep to catch any resources that load post-onload.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698