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

Unified 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698