| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 function triggerPrompt() { | 5 function triggerPrompt() { |
| 6 document.getElementById('flash-link').click(); | 6 document.getElementById('flash-link').click(); |
| 7 window.domAutomationController.send(true); | 7 window.domAutomationController.send(true); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function triggerPromptViaNewWindow() { | 10 function triggerPromptViaNewWindow() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 window.domAutomationController.send(false); | 25 window.domAutomationController.send(false); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function flashIsEnabled() { | 28 function flashIsEnabled() { |
| 29 flashIsEnabledForPlugin(document.getElementById('flash-object')); | 29 flashIsEnabledForPlugin(document.getElementById('flash-object')); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function flashIsEnabledForPluginWithoutFallback() { | 32 function flashIsEnabledForPluginWithoutFallback() { |
| 33 flashIsEnabledForPlugin( | 33 flashIsEnabledForPlugin( |
| 34 document.getElementById('flash-object-no-fallback')); | 34 document.getElementById('flash-object-no-fallback')); |
| 35 } | 35 } |
| 36 |
| 37 function spawnPopupAndAwaitLoad() { |
| 38 var popup = window.open(window.location.href); |
| 39 popup.addEventListener('load', function handleLoad() { |
| 40 popup.removeEventListener('load', handleLoad); |
| 41 window.domAutomationController.send(true); |
| 42 }); |
| 43 } |
| OLD | NEW |