Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/clipboard/async-001.html

Issue 2695593006: Initial stub version of Async Clipboard API (Closed)
Patch Set: Add WPTs; Update naming conventions; Review comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <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.
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script>
7 test(function() {
8 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.
9 }, "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.
10
11 promise_test(function() {
12 var dt = new DataTransfer();
13 dt.items.add("Howdy", "text/plain");
14 return navigator.clipboard.write(dt);
15 }, "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.
16
17 promise_test(function() {
18 return navigator.clipboard.writeText("New clipboard text");
19 }, "Verify navigator.clipboard.writeText(DOMString) succeeds");
20
21 promise_test(function() {
22 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.
23 }, "Verify navigator.clipboard.read() succeeds");
24
25 promise_test(function() {
26 return navigator.clipboard.readText();
foolip 2017/05/15 15:33:26 Ditto.
garykac 2017/05/17 23:51:13 Done.
27 }, "Verify navigator.clipboard.readText() succeeds");
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698