OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>Async Clipboard writeText -> readText tests</title> |
| 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 async_test(function(t) { |
| 8 var test_data = "Clipboard writeText -> readText test data"; |
| 9 var cb = navigator.clipboard; |
| 10 cb.writeText(test_data).then(t.step_func(() => { |
| 11 cb.readText().then(t.step_func((data) => { |
| 12 assert_equals(data, test_data); |
| 13 t.done(); |
| 14 }), function() { |
| 15 t.unreached_func("clipboard.readText() fail"); |
| 16 }); |
| 17 }), function() { |
| 18 t.unreached_func("clipboard.writeText() fail"); |
| 19 }); |
| 20 }, "Verify write and read clipboard (DOMString)"); |
| 21 </script> |
| 22 Note: This is a manual test because it writes/reads to the shared system |
| 23 clipboard and thus cannot be run async with other tests that might interact |
| 24 with the clipboard. |
OLD | NEW |