Index: chrome/test/data/permissions/flash.html |
diff --git a/chrome/test/data/permissions/flash.html b/chrome/test/data/permissions/flash.html |
index d5bb3f175592cf0fb816ae117d4ee1f01847268d..a8e8390f969d143c134c5bf4bc656040ee98c26a 100644 |
--- a/chrome/test/data/permissions/flash.html |
+++ b/chrome/test/data/permissions/flash.html |
@@ -11,23 +11,33 @@ |
window.domAutomationController.send(true); |
} |
- function flashIsEnabled() { |
- var plugin = document.getElementById('flash-object'); |
+ function flashIsEnabledForPlugin(plugin) { |
plugin.addEventListener('message', function handleEvent(event) { |
- if (event.data.source === 'getPowerSaverStatusResponse') { |
+ if (event.data.source === 'getPowerSaverStatusResponse') { |
plugin.removeEventListener('message', handleEvent); |
window.domAutomationController.send(true); |
} |
}); |
- if (plugin.postMessage) { |
+ if (plugin.postMessage) |
plugin.postMessage('getPowerSaverStatus'); |
- } else { |
+ else |
window.domAutomationController.send(false); |
- } |
+ } |
+ |
+ function flashIsEnabled() { |
+ flashIsEnabledForPlugin(document.getElementById('flash-object')); |
+ } |
+ |
+ function flashIsEnabledForPluginWithoutFallack() { |
Bernhard Bauer
2016/10/04 09:21:00
fallack?
raymes
2016/10/04 23:12:19
Done.
|
+ flashIsEnabledForPlugin( |
+ document.getElementById('flash-object-no-fallback')); |
} |
</script> |
<body> |
- <object id="flash-object" name="plugin" data="test.swf" |
+ <object id="flash-object-no-fallback" data="test.swf" |
+ type="application/x-shockwave-flash" width="400" height="100"> |
+ </object> |
+ <object id="flash-object" data="test.swf" |
type="application/x-shockwave-flash" width="400" height="100"> |
Flash not supported. |
<br> |