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

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

Issue 2385033002: Hookup the plugin placeholder to the Flash permission prompt (Closed)
Patch Set: Hookup the plugin placeholder to the Flash permission prompt Created 4 years, 2 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
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>

Powered by Google App Engine
This is Rietveld 408576698