OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <meta charset="utf-8"> | |
3 <title>Async Clipboard write/read (DOMString) 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 = "Exciting DOMString clipboard data"; | |
9 var cb = navigator.clipboard; | |
10 cb.writeText(test_data).then(function() { | |
11 cb.readText().then(function(data) { | |
foolip
2017/05/15 15:33:27
Can you also test what happens with writeText+read
garykac
2017/05/17 23:51:14
Done.
| |
12 t.step(function(){assert_equals(data, test_data);}); | |
13 t.done(); | |
14 }, function() { | |
15 t.step(function(){assert_false(true, "Read fail");}); | |
16 t.done(); | |
17 }); | |
18 }, function() { | |
19 t.step(function(){assert_false(true, "Write fail");}); | |
20 t.done(); | |
21 }); | |
22 }, "Verify write and read clipboard (DOMString)"); | |
23 </script> | |
24 Note: This is a manual test because it writes/reads to the shared system | |
25 clipboard and thus cannot be run async with other tests that might interact | |
26 with the clipboard. | |
OLD | NEW |