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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-write-dttext-read-dttext-manual.https.html

Issue 2695593006: Initial stub version of Async Clipboard API (Closed)
Patch Set: Address review comments; improve tests 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 write (dt/text) -> read (dt/text) 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 write (dt/text) -> read (dt/text) test data";
9 var cb = navigator.clipboard;
10 var dt = new DataTransfer();
11 dt.items.add(test_data, "text/plain");
12
13 cb.write(dt).then(t.step_func(() => {
14 cb.read().then(t.step_func((data) => {
15 assert_equals(data.items.length, 1);
16 data.items[0].getAsString(t.step_func((s) => {
17 assert_equals(s, test_data);
18 t.done();
19 }));
20 }), function() {
21 t.unreached_func("clipboard.read() fail");
22 });
23 }), function() {
24 t.unreached_func("clipboard.write() fail");
25 });
26 }, "Verify write and read clipboard (DataTransfer/text)");
27 </script>
28 Note: This is a manual test because it writes/reads to the shared system
dcheng 2017/06/06 23:33:38 I'm not sure this statement is true in Chrome, fwi
garykac 2017/06/09 20:38:59 It's not true when Chrome runs its copy of the tes
29 clipboard and thus cannot be run async with other tests that might interact
30 with the clipboard.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698