Chromium Code Reviews| 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..dc9ccf154129d0effa6d8b281d94a18ec181595f 100644 |
| --- a/chrome/test/data/permissions/flash.html |
| +++ b/chrome/test/data/permissions/flash.html |
| @@ -11,10 +11,14 @@ |
| window.domAutomationController.send(true); |
| } |
| - function flashIsEnabled() { |
| - var plugin = document.getElementById('flash-object'); |
| + function triggerPromptViaPluginPlaceholder() { |
|
tommycli
2016/10/03 17:28:50
I think this function is not used.
raymes
2016/10/04 05:07:21
Done.
|
| + document.getElementById('flash-object-no-fallback').click(); |
| + window.domAutomationController.send(true); |
| + } |
| + |
| + 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); |
| } |
| @@ -25,9 +29,21 @@ |
| window.domAutomationController.send(false); |
|
tommycli
2016/10/03 17:28:50
I wonder if this is the source of the flakiness.
raymes
2016/10/04 05:07:21
postMessage should appear synchronously on the pep
|
| } |
| } |
| + |
| + function flashIsEnabled() { |
| + flashIsEnabledForPlugin(document.getElementById('flash-object')); |
| + } |
| + |
| + function flashIsEnabledForPluginWithoutFallack() { |
|
tommycli
2016/10/03 17:28:50
This is getting confusing. Perhaps split into mult
raymes
2016/10/04 05:07:21
Splitting it into another test will add its own co
|
| + 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> |