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

Unified Diff: telemetry/telemetry/page/cache_temperature.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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/util/webpagereplay.py ('k') | telemetry/telemetry/page/legacy_page_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/page/cache_temperature.py
diff --git a/telemetry/telemetry/page/cache_temperature.py b/telemetry/telemetry/page/cache_temperature.py
index 9f367d8435c3bbfffdf47c4587a0497677d7b956..7d1f98194600667474a72e96043f78c3530969fb 100644
--- a/telemetry/telemetry/page/cache_temperature.py
+++ b/telemetry/telemetry/page/cache_temperature.py
@@ -71,6 +71,15 @@ def EnsurePageCacheTemperature(page, browser, previous_page=None):
previous_page.url == page.url and
(previous_page.cache_temperature == PCV1_COLD or
previous_page.cache_temperature == PCV1_WARM)):
+ if '#' in page.url:
+ # Navigate to inexistent URL to avoid in-page hash navigation.
+ # Note: Unlike PCv1, PCv2 iterates the same URL for different cache
+ # configurations. This may issue blink in-page hash navigations,
+ # which isn't intended here.
+ with MarkTelemetryInternal(browser, 'avoid_double_hash_navigation'):
+ tab = browser.tabs[0]
+ tab.Navigate("http://does.not.exist")
+ tab.WaitForDocumentReadyStateToBeComplete()
return
with MarkTelemetryInternal(browser, 'warmCache'):
« no previous file with comments | « telemetry/telemetry/internal/util/webpagereplay.py ('k') | telemetry/telemetry/page/legacy_page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698