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

Unified Diff: chrome/test/data/banners/main.js

Issue 2942513002: Allow banners to trigger on sites which don't register a service worker onload. (Closed)
Patch Set: Fix crashing Android test. Comments Created 3 years, 6 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
Index: chrome/test/data/banners/main.js
diff --git a/chrome/test/data/banners/main.js b/chrome/test/data/banners/main.js
index 484e7b44ecf4a84f0ba85e5ada6cf545f625f9e7..f24ce64f24d0ca6d9668bc093603d5c8e5ec8ad2 100644
--- a/chrome/test/data/banners/main.js
+++ b/chrome/test/data/banners/main.js
@@ -20,3 +20,11 @@ function addManifestLinkTag() {
linkTag.href = manifestUrl;
document.head.append(linkTag);
}
+
+function getSwDelay() {
+ // Allow the test page to set a custom delay (required since desktop is
+ // faster than Android and hence needs a longer delay).
+ var url = window.location.href;
+ var swDelayIndex = url.indexOf("?swdelay=");
+ return (swDelayIndex >= 0) ? url.slice(swDelayIndex + 9) : 300;
+}

Powered by Google App Engine
This is Rietveld 408576698