Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/clipboard/async-rw-text-manual.html |
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-rw-text-manual.html b/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-rw-text-manual.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..613d9708293eb34ba5e519fc4f04a7a8ea7a68d1 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-rw-text-manual.html |
| @@ -0,0 +1,26 @@ |
| +<!DOCTYPE html> |
| +<meta charset="utf-8"> |
| +<title>Async Clipboard write/read (DOMString) tests</title> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script> |
| +async_test(function(t) { |
| + var test_data = "Exciting DOMString clipboard data"; |
| + var cb = navigator.clipboard; |
| + cb.writeText(test_data).then(function() { |
| + 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.
|
| + t.step(function(){assert_equals(data, test_data);}); |
| + t.done(); |
| + }, function() { |
| + t.step(function(){assert_false(true, "Read fail");}); |
| + t.done(); |
| + }); |
| + }, function() { |
| + t.step(function(){assert_false(true, "Write fail");}); |
| + t.done(); |
| + }); |
| +}, "Verify write and read clipboard (DOMString)"); |
| +</script> |
| +Note: This is a manual test because it writes/reads to the shared system |
| +clipboard and thus cannot be run async with other tests that might interact |
| +with the clipboard. |