| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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() { | 5 (function() { |
| 6 | 6 |
| 7 var getIframe = function() { return document.querySelector('iframe'); }; |
| 8 |
| 7 window.tests = { | 9 window.tests = { |
| 8 canReadClipboard: function() { | 10 canReadClipboard: function() { |
| 9 domAutomationController.send(document.execCommand('paste')); | 11 domAutomationController.send(document.execCommand('paste')); |
| 10 }, | 12 }, |
| 11 | 13 |
| 12 canWriteClipboard: function() { | 14 canWriteClipboard: function() { |
| 13 domAutomationController.send(document.execCommand('copy')); | 15 domAutomationController.send(document.execCommand('copy')); |
| 14 }, | 16 }, |
| 17 |
| 18 canReadClipboardInAboutBlankFrame: function() { |
| 19 domAutomationController.send( |
| 20 getIframe().contentDocument.execCommand('paste')); |
| 21 }, |
| 22 |
| 23 canWriteClipboardInAboutBlankFrame: function() { |
| 24 domAutomationController.send( |
| 25 getIframe().contentDocument.execCommand('copy')); |
| 26 }, |
| 15 }; | 27 }; |
| 16 | 28 |
| 17 }()); | 29 }()); |
| OLD | NEW |