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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/clipboard/async-rw-text-manual.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 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.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698