Bug 1529229 [wpt PR 15470] - Async Clipboard: Make test naming more clear, a=testonly
☠☠ backed out by 66b1aba3fb43 ☠ ☠
authorDarwin Huang <huangdarwin@chromium.org>
Wed, 06 Mar 2019 12:31:44 +0000
changeset 522242 253adcb96f4116fd0977f4d57d51caafbbddd3db
parent 522241 719455274599350ee611a03e27ca26f22299d7b5
child 522243 d252a703780185fee6db23722af287ac433deb6c
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1529229, 15470, 896479, 1478296, 634005
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529229 [wpt PR 15470] - Async Clipboard: Make test naming more clear, a=testonly Automatic update from web-platform-tests Async Clipboard: Make test naming more clear - Test messages and errors had confusing/outdated typenames, so this CL aims to update them and make them more consistent. - No test logic changes. Bug: 896479 Change-Id: I68726a63e6d7f6c8f964b902c5fa9dbc691787f5 Reviewed-on: https://chromium-review.googlesource.com/c/1478296 Commit-Queue: Darwin Huang <huangdarwin@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#634005} -- wpt-commits: b6d9f766aaea899da6b1c6d585f2e68f996a3c39 wpt-pr: 15470
testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html
testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html
testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html
testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html
testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html
--- a/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html
@@ -6,22 +6,24 @@
 <script>
 
 test(() => {
   assert_not_equals(navigator.clipboard, undefined);
   assert_true(navigator.clipboard instanceof Clipboard);
   assert_equals(navigator.clipboard, navigator.clipboard);
 }, "navigator.clipboard exists");
 
-/* clipboard.write(Blob/text) */
+/* clipboard.write(text/plain Blob) */
 
 promise_test(async () => {
   const blob = new Blob(["hello"], {type: 'text/plain'});
   await navigator.clipboard.write(blob);
-}, "navigator.clipboard.write(Blob) succeeds");
+}, "navigator.clipboard.write(text/plain Blob) succeeds");
+
+/* clipboard.write(invalid input) */
 
 promise_test(async t => {
   await promise_rejects(t, new TypeError(),
                          navigator.clipboard.write());
 }, "navigator.clipboard.write() fails (expect Blob)");
 
 promise_test(async t => {
   await promise_rejects(t, new TypeError(),
@@ -40,33 +42,27 @@ promise_test(async () => {
   await navigator.clipboard.writeText("New clipboard text");
 }, "navigator.clipboard.writeText(DOMString) succeeds");
 
 promise_test(async t => {
   await promise_rejects(t, new TypeError(),
                          navigator.clipboard.writeText());
 }, "navigator.clipboard.writeText() fails (expect DOMString)");
 
-/* clipboard.write(Blob/image) */
+/* clipboard.write(image/png Blob) */
 
 promise_test(async () => {
   const fetched = await fetch(
         'http://localhost:8001/clipboard-apis/resources/greenbox.png');
   const image = await fetched.blob();
 
   await navigator.clipboard.write(image);
-}, "navigator.clipboard.writeImageExperimental(Blob) succeeds");
+}, "navigator.clipboard.write(image/png Blob) succeeds");
 
-promise_test(async t => {
-  await promise_rejects(t, new TypeError(),
-                        navigator.clipboard.write());
-}, "navigator.clipboard.writeImageExperimental() fails (expect Blob)");
-
-
-/* Blob/text or Blob/image clipboard.read() */
+/* text/plain or image/png Blob clipboard.read() */
 
 promise_test(async () => {
   const result = await navigator.clipboard.read();
   assert_true(result instanceof Blob);
   assert_equals(typeof result, "object");
 }, "navigator.clipboard.read() succeeds");
 
 
--- a/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html
@@ -1,27 +1,27 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
-<title>Async Clipboard write (Blob/text) -> read (Blob/text) tests</title>
+<title>Async Clipboard write (text/plain Blob) -> read (text/plain Blob) tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 async function readWriteTest(textInput) {
   promise_test(async t => {
     const blobInput = new Blob([textInput], {type: 'text/plain'});
 
     await navigator.clipboard.write(blobInput);
     const blobOutput = await navigator.clipboard.read();
     assert_equals(blobOutput.type, "text/plain");
 
     const textOutput = await (new Response(blobOutput)).text();
     assert_equals(textOutput, textInput);
   }, "Verify write and read clipboard given text: " + textInput);
 }
 
-readWriteTest("Clipboard write (Blob/text) -> read (Blob/text) test");
+readWriteTest("Clipboard write (text/plain Blob) -> read (text/plain Blob) test");
 readWriteTest("non-Latin1 text encoding test データ");
 </script>
 <p>
   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.
 </p>
--- a/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html
@@ -1,25 +1,25 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
-<title>Async Clipboard write (Blob/text) -> readText tests</title>
+<title>Async Clipboard write (text/plain Blob) -> readText tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 async function readWriteTest(textInput) {
   promise_test(async t => {
     const blobInput = new Blob([textInput], {type: 'text/plain'});
 
     await navigator.clipboard.write(blobInput);
     const textOutput = await navigator.clipboard.readText();
 
     assert_equals(textOutput, textInput);
   }, "Verify write and read clipboard given text: " + textInput);
 }
 
-readWriteTest("Clipboard write (Blob/text) -> read text test");
+readWriteTest("Clipboard write (text/plain Blob) -> read text test");
 readWriteTest("non-Latin1 text encoding test データ");
 </script>
 <p>
   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.
 </p>
--- a/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
 <title>
-  Async Clipboard writeImageExperimental -> readImageExperimental tests
+  Async Clipboard write image/png Blob -> read image/png Blob tests
 </title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 
 <p>
   <p>The bottom image should display the same image as the top image.</p>
   <p>Original Image:</p>
   <image id='image-to-copy' width='20' height='20'
--- a/testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html
+++ b/testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html
@@ -1,25 +1,25 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
-<title>Async Clipboard writeText -> read (Blob/text) tests</title>
+<title>Async Clipboard writeText -> read (text/plain Blob) tests</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 async function readWriteTest(textInput) {
   promise_test(async t => {
     await navigator.clipboard.writeText(textInput);
     const blobOutput = await navigator.clipboard.read();
     assert_equals(blobOutput.type, "text/plain");
 
     const textOutput = await (new Response(blobOutput)).text();
     assert_equals(textOutput, textInput);
   }, "Verify write and read clipboard given text: " + textInput);
 }
 
-readWriteTest("Clipboard write text -> read (Blob/text) test");
+readWriteTest("Clipboard write text -> read (text/plain Blob) test");
 readWriteTest("non-Latin1 text encoding test データ");
 </script>
 <p>
   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.
 </p>