| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 1 // Clipboard permission test for Chrome. | 5 // Clipboard permission test for Chrome. |
| 2 // browser_tests.exe --gtest_filter=ClipboardApiTest.Extension | 6 // browser_tests.exe --gtest_filter=ClipboardApiTest.Extension |
| 3 | 7 |
| 4 chrome.test.runTests([ | 8 chrome.test.runTests([ |
| 5 function domCopy() { | 9 function domCopy() { |
| 6 if (document.execCommand('copy')) | 10 if (document.execCommand('copy')) |
| 7 chrome.test.succeed(); | 11 chrome.test.succeed(); |
| 8 else | 12 else |
| 9 chrome.test.fail('execCommand("copy") failed'); | 13 chrome.test.fail('execCommand("copy") failed'); |
| 10 }, | 14 }, |
| 11 function domPaste() { | 15 function domPaste() { |
| 12 if (document.execCommand('paste')) | 16 if (document.execCommand('paste')) |
| 13 chrome.test.succeed(); | 17 chrome.test.succeed(); |
| 14 else | 18 else |
| 15 chrome.test.fail('execCommand("paste") failed'); | 19 chrome.test.fail('execCommand("paste") failed'); |
| 16 } | 20 } |
| 17 ]); | 21 ]); |
| 18 | 22 |
| OLD | NEW |