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

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

Issue 2462963002: Implement modal permission prompts for media permissions on Android. (Closed)
Patch Set: Rebase 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
Index: content/test/data/android/media_permissions.html
diff --git a/content/test/data/android/media_permissions.html b/content/test/data/android/media_permissions.html
index 592ad7b3d0d43014274485038101099ec31971ac..a2ea44d8c879452f23c94ae3e49e1433ab11a968 100644
--- a/content/test/data/android/media_permissions.html
+++ b/content/test/data/android/media_permissions.html
@@ -34,6 +34,18 @@
navigator.webkitGetUserMedia(
{video : true, audio: true}, gotCombined, 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_getCombined()';
+ function runFunctionOnClick() {
+ eval(functionToRun);
+ }
+
+ window.addEventListener('load', () => {
+ window.addEventListener('click', runFunctionOnClick);
+ });
</script>
</head>
<body>

Powered by Google App Engine
This is Rietveld 408576698