Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <script> | 3 <script> |
| 4 function triggerPrompt() { | 4 function triggerPrompt() { |
| 5 document.getElementById('flash-link').click(); | 5 document.getElementById('flash-link').click(); |
| 6 window.domAutomationController.send(true); | 6 window.domAutomationController.send(true); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function triggerPromptViaNewWindow() { | 9 function triggerPromptViaNewWindow() { |
| 10 document.getElementById('flash-new-window-link').click(); | 10 document.getElementById('flash-new-window-link').click(); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 window.domAutomationController.send(false); | 24 window.domAutomationController.send(false); |
| 25 } | 25 } |
| 26 | 26 |
| 27 function flashIsEnabled() { | 27 function flashIsEnabled() { |
| 28 flashIsEnabledForPlugin(document.getElementById('flash-object')); | 28 flashIsEnabledForPlugin(document.getElementById('flash-object')); |
| 29 } | 29 } |
| 30 | 30 |
| 31 function flashIsEnabledForPluginWithoutFallback() { | 31 function flashIsEnabledForPluginWithoutFallback() { |
| 32 flashIsEnabledForPlugin( | 32 flashIsEnabledForPlugin( |
| 33 document.getElementById('flash-object-no-fallback')); | 33 document.getElementById('flash-object-no-fallback')); |
| 34 } | 34 } |
|
raymes
2016/10/05 04:51:27
I should probably pull out the common code but I c
tommycli
2016/10/05 16:26:20
Yes, that would be good.
raymes
2016/10/05 23:15:53
Done.
| |
| 35 </script> | 35 </script> |
| 36 <body> | 36 <body> |
| 37 <object id="flash-object-no-fallback" data="test.swf" | 37 <object id="flash-object-no-fallback" data="test.swf" |
| 38 type="application/x-shockwave-flash" width="400" height="100"> | 38 type="application/x-shockwave-flash" width="400" height="100"> |
| 39 </object> | 39 </object> |
| 40 <object id="flash-object" data="test.swf" | 40 <object id="flash-object" data="test.swf" |
| 41 type="application/x-shockwave-flash" width="400" height="100"> | 41 type="application/x-shockwave-flash" width="400" height="100"> |
| 42 Flash not supported. | 42 Flash not supported. |
| 43 <br> | 43 <br> |
| 44 <a href="https://get.adobe.com/flashplayer/" id="flash-link"> | 44 <a href="https://get.adobe.com/flashplayer/" id="flash-link"> |
| 45 Download Flash. | 45 Download Flash. |
| 46 </a> | 46 </a> |
| 47 <a id="flash-new-window-link" | 47 <a id="flash-new-window-link" |
| 48 onclick="window.open('https://get.adobe.com/flashplayer/');"> | 48 onclick="window.open('https://get.adobe.com/flashplayer/');"> |
| 49 Download Flash window.open | 49 Download Flash window.open |
| 50 </a> | 50 </a> |
| 51 </object> | 51 </object> |
| 52 </body> | 52 </body> |
| 53 </html> | 53 </html> |
| OLD | NEW |