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

Unified Diff: chrome/test/data/permissions/flash.html

Issue 2361453004: Add browsertest for Flash permission prompt (Closed)
Patch Set: Test Created 4 years, 3 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 | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/permissions/flash.html
diff --git a/chrome/test/data/permissions/flash.html b/chrome/test/data/permissions/flash.html
new file mode 100644
index 0000000000000000000000000000000000000000..d5bb3f175592cf0fb816ae117d4ee1f01847268d
--- /dev/null
+++ b/chrome/test/data/permissions/flash.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<script>
+ function triggerPrompt() {
+ document.getElementById('flash-link').click();
+ window.domAutomationController.send(true);
+ }
+
+ function triggerPromptViaNewWindow() {
+ document.getElementById('flash-new-window-link').click();
+ window.domAutomationController.send(true);
+ }
+
+ function flashIsEnabled() {
+ var plugin = document.getElementById('flash-object');
+ plugin.addEventListener('message', function handleEvent(event) {
+ if (event.data.source === 'getPowerSaverStatusResponse') {
+ plugin.removeEventListener('message', handleEvent);
+ window.domAutomationController.send(true);
+ }
+ });
+ if (plugin.postMessage) {
+ plugin.postMessage('getPowerSaverStatus');
+ } else {
+ window.domAutomationController.send(false);
+ }
+ }
+</script>
+<body>
+ <object id="flash-object" name="plugin" data="test.swf"
+ type="application/x-shockwave-flash" width="400" height="100">
+ Flash not supported.
+ <br>
+ <a href="https://get.adobe.com/flashplayer/" id="flash-link">
+ Download Flash.
+ </a>
+ <a id="flash-new-window-link"
+ onclick="window.open('https://get.adobe.com/flashplayer/');">
+ Download Flash window.open
+ </a>
+ </object>
+</body>
+</html>
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698