Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/clipboard/async-001.html |
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-001.html b/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-001.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ce81d9b00d3d993cfa1bbac6c84aaf9d24564e89 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/clipboard/async-001.html |
| @@ -0,0 +1,28 @@ |
| +<!DOCTYPE html> |
| +<meta charset="utf-8"> |
| +<title>Async Clipboard basic tests</title> |
|
foolip
2017/05/15 15:33:27
Can you put this test under wpt/clipboard-apis/, t
garykac
2017/05/17 23:51:13
Done.
|
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script> |
| +test(function() { |
| + assert_not_equals(navigator.clipboard, undefined); |
|
foolip
2017/05/15 15:33:27
Can you also assert_true(navigator.clipboard insta
foolip
2017/05/15 15:42:08
Actually, the existing line could be turned into a
garykac
2017/05/17 23:51:13
Done.
garykac
2017/05/17 23:51:13
Done.
|
| +}, "Verify navigator.clipboard exists"); |
|
foolip
2017/05/15 15:33:27
Nit: the leading "Verify " of all descriptions can
garykac
2017/05/17 23:51:13
Done.
|
| + |
| +promise_test(function() { |
| + var dt = new DataTransfer(); |
| + dt.items.add("Howdy", "text/plain"); |
| + return navigator.clipboard.write(dt); |
| +}, "Verify navigator.clipboard.write(DataTransfer) succeeds"); |
|
foolip
2017/05/15 15:33:27
Can you add a test for things that should not succ
garykac
2017/05/17 23:51:13
Done.
|
| + |
| +promise_test(function() { |
| + return navigator.clipboard.writeText("New clipboard text"); |
| +}, "Verify navigator.clipboard.writeText(DOMString) succeeds"); |
| + |
| +promise_test(function() { |
| + return navigator.clipboard.read(); |
|
foolip
2017/05/15 15:33:27
Also assert some things about the value with which
garykac
2017/05/17 23:51:13
Done.
|
| +}, "Verify navigator.clipboard.read() succeeds"); |
| + |
| +promise_test(function() { |
| + return navigator.clipboard.readText(); |
|
foolip
2017/05/15 15:33:26
Ditto.
garykac
2017/05/17 23:51:13
Done.
|
| +}, "Verify navigator.clipboard.readText() succeeds"); |
| +</script> |