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

Unified Diff: content/test/data/android/geolocation.html

Issue 2446063002: Implement a modal permission dialog on Android gated by a feature. (Closed)
Patch Set: Move delegate creation and dispatch into constructor Created 4 years, 1 month 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 | « chrome/common/chrome_features.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/android/geolocation.html
diff --git a/content/test/data/android/geolocation.html b/content/test/data/android/geolocation.html
index a7315e289529d4e95c4b0f99bd555d8de9c33482..6a9cd48510c44490b84525e8cc68209655aeb9e6 100644
--- a/content/test/data/android/geolocation.html
+++ b/content/test/data/android/geolocation.html
@@ -4,6 +4,7 @@
<title>Geolocation</title>
<script>
var positionCount = 0;
+
function gotPos(position) {
positionCount++;
window.document.title = 'Count:' + positionCount;
@@ -20,6 +21,18 @@
navigator.geolocation.watchPosition(
gotPos, errorCallback, { });
}
+
+ // The modal permission dialog requires a user gesture to trigger.
+ // Hook up a click event listener to run a specified method (which
+ // may be changed by the test).
+ var functionToRun = 'initiate_getCurrentPosition()';
+ function runFunctionOnClick() {
+ eval(functionToRun);
+ }
+
+ window.addEventListener('load', () => {
+ window.addEventListener('click', runFunctionOnClick);
+ });
</script>
</head>
<body>
« no previous file with comments | « chrome/common/chrome_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698