Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/clipboard/extension_no_permission/test.js |
| diff --git a/chrome/test/data/extensions/api_test/clipboard/extension_no_permission/test.js b/chrome/test/data/extensions/api_test/clipboard/extension_no_permission/test.js |
| index 544c6ed2853333a27d38f2b87b3bb383ded76013..a068b2d08e9c173414424dab0a97e811b99270dd 100644 |
| --- a/chrome/test/data/extensions/api_test/clipboard/extension_no_permission/test.js |
| +++ b/chrome/test/data/extensions/api_test/clipboard/extension_no_permission/test.js |
| @@ -21,17 +21,21 @@ chrome.test.runTests([ |
| function copyInIframe() { |
| var ifr = document.createElement('iframe'); |
| document.body.appendChild(ifr); |
| - if (ifr.contentDocument.execCommand('copy')) |
| - chrome.test.succeed(); |
| - else |
| - chrome.test.fail('execCommand("copy") failed in iframe'); |
| + window.command = 'copy'; |
| + ifr.contentDocument.write('<script src="iframe.js"></script>'); |
| }, |
| function pasteInIframe() { |
| var ifr = document.createElement('iframe'); |
| document.body.appendChild(ifr); |
| - if (ifr.contentDocument.execCommand('paste')) |
| - chrome.test.fail('execCommand("paste") succeeded in iframe'); |
| - else |
| - chrome.test.succeed(); |
| + window.command = 'paste'; |
| + ifr.contentDocument.write('<script src="iframe.js"></script>'); |
| } |
| ]); |
| + |
| +function testDone(result) { |
| + if (window.command === 'paste') result = !result; |
|
not at google - send to devlin
2014/08/22 17:21:35
I find it hard to parse this out of context (bounc
|
| + if (result) |
| + chrome.test.succeed(); |
| + else |
| + chrome.test.fail(); |
| +} |