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

Side by Side Diff: chrome/test/data/permissions/flash.html

Issue 2361453004: Add browsertest for Flash permission prompt (Closed)
Patch Set: Add browesrtest for Flash permission prompt 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <script>
4 function triggerPrompt() {
5 document.getElementById('flash-link').click();
6 window.domAutomationController.send(true);
7 }
8
9 function flashIsEnabled() {
10 var plugin = document.getElementById('flash-object');
11 function handleEvent(event) {
12 if (event.data.source === 'getPowerSaverStatusResponse') {
13 plugin.removeEventListener('message', handleEvent);
14 window.domAutomationController.send(true);
15 }
16 }
17 plugin.addEventListener('message', handleEvent);
tommycli 2016/09/26 22:54:49 nit: I've seen this cool pattern recently: plugin
raymes 2016/09/27 04:05:41 Cool, thanks!
18 if (plugin.postMessage) {
19 plugin.postMessage('getPowerSaverStatus');
20 } else {
21 window.domAutomationController.send(false);
22 }
23 }
24 </script>
25 <body>
26 <object id="flash-object" name="plugin" data="test.swf"
27 type="application/x-shockwave-flash" width="400" height="100">
28 Flash not supported.
29 <br>
30 <a href="https://get.adobe.com/flashplayer/" id="flash-link">Download Flash. </a>
tommycli 2016/09/26 22:54:49 need line wrap here?
raymes 2016/09/27 04:05:41 Done.
31 </object>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698