WebKit Bugzilla
Attachment 349571 Details for
Bug 189526
: Import media recorder api WPT tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189526-20180912130226.patch (text/plain), 9.32 KB, created by
Wendy
on 2018-09-12 13:02:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wendy
Created:
2018-09-12 13:02:27 PDT
Size:
9.32 KB
patch
obsolete
>Subversion Revision: 235907 >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 4cd9c80198807dbec0ea9913d4469ebbe9d2151f..b72cbedec2c093330071704516ece0aae8a52769 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,20 @@ >+2018-09-11 YUHAN WU <yuhan_wu@apple.com> >+ >+ Import media recorder api WPT tests >+ https://bugs.webkit.org/show_bug.cgi?id=189526 >+ >+ Reviewed by Youenn Fablet. >+ >+ * resources/import-expectations.json: >+ * web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt: Added. >+ * web-platform-tests/mediacapture-record/BlobEvent-constructor.html: Added. >+ * web-platform-tests/mediacapture-record/META.yml: Added. >+ * web-platform-tests/mediacapture-record/idlharness.window-expected.txt: Added. >+ * web-platform-tests/mediacapture-record/idlharness.window.html: Added. >+ * web-platform-tests/mediacapture-record/idlharness.window.js: Added. >+ (idl_array.catch): >+ * web-platform-tests/mediacapture-record/w3c-import.log: Added. >+ > 2018-09-11 Chris Dumez <cdumez@apple.com> > > Unreviewed, rebaseline imported/w3c/web-platform-tests/css/cssom/interfaces.html after r235889. >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index a2eee7b9738511c5b5e826bbbf0207c0f8b73a9e..090d256acd5fa0c9825fec249f3ee2e14e8e2680 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -257,7 +257,7 @@ > "web-platform-tests/media-capabilities": "skip", > "web-platform-tests/media-source": "import", > "web-platform-tests/mediacapture-image": "skip", >- "web-platform-tests/mediacapture-record": "skip", >+ "web-platform-tests/mediacapture-record": "import", > "web-platform-tests/mediacapture-streams": "import", > "web-platform-tests/mediasession": "skip", > "web-platform-tests/microdata": "skip", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..45fc930dcb5354f480f230e0e8f3c8f95f8b4fef >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt >@@ -0,0 +1,7 @@ >+ >+FAIL The BlobEventInit dictionary is required Can't find variable: BlobEvent >+FAIL The BlobEventInit dictionary's data member is required. assert_throws: function "function () { >+ new BlobEvent("type", {}); >+ }" threw object "ReferenceError: Can't find variable: BlobEvent" ("ReferenceError") expected object "TypeError" ("TypeError") >+FAIL The BlobEvent instance's data attribute is set. Can't find variable: BlobEvent >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3bcf4296e68aea1a7b167e570c0dcec148cc95e4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html >@@ -0,0 +1,38 @@ >+<!doctype html> >+<title>BlobEvent constructor</title> >+<link rel="help" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#blob-event"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+test(function() { >+ assert_equals(BlobEvent.length, 2); >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type"); >+ }); >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type", null); >+ }); >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type", undefined); >+ }); >+}, "The BlobEventInit dictionary is required"); >+ >+test(function() { >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type", {}); >+ }); >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type", { data: null }); >+ }); >+ assert_throws(new TypeError, function() { >+ new BlobEvent("type", { data: undefined }); >+ }); >+}, "The BlobEventInit dictionary's data member is required."); >+ >+test(function() { >+ var blob = new Blob(); >+ var event = new BlobEvent("type", { data: blob }); >+ assert_equals(event.type, "type"); >+ assert_equals(event.data, blob); >+}, "The BlobEvent instance's data attribute is set."); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml >new file mode 100644 >index 0000000000000000000000000000000000000000..d59e5e30845eaef12bab6419e348a01779313c56 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml >@@ -0,0 +1,3 @@ >+spec: https://w3c.github.io/mediacapture-record/ >+suggested_reviewers: >+ - yellowdoge >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a7ea32791cb00693f3794a23d3284a92679c52ff >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window-expected.txt >@@ -0,0 +1,30 @@ >+ >+FAIL idl_test setup promise_test: Unhandled rejection with value: object "Got an error before parsing any named definition: Unrecognised tokens, line 1 (tokens: "{\"error\": {\"message\"") >+[ >+ { >+ "type": "{", >+ "value": "{", >+ "trivia": "" >+ }, >+ { >+ "type": "string", >+ "value": "\"error\"", >+ "trivia": "" >+ }, >+ { >+ "type": ":", >+ "value": ":", >+ "trivia": "" >+ }, >+ { >+ "type": "{", >+ "value": "{", >+ "trivia": " " >+ }, >+ { >+ "type": "string", >+ "value": "\"message\"", >+ "trivia": "" >+ } >+]" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2382913528e693b3a5d56c660a45060980b548c3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.html >@@ -0,0 +1 @@ >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js >new file mode 100644 >index 0000000000000000000000000000000000000000..86f5a158822156b54e776639fb9c7504f0ff7498 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js >@@ -0,0 +1,38 @@ >+// META: script=/resources/WebIDLParser.js >+// META: script=/resources/idlharness.js >+ >+'use strict'; >+ >+// https://w3c.github.io/mediacapture-record/ >+ >+idl_test( >+ ['mediastream-recording'], >+ ['mediacapture-streams', 'FileAPI', 'html', 'dom'], >+ idl_array => { >+ // Ignored errors will be surfaced in idlharness.js's test_object below. >+ let recorder, blob, error; >+ try { >+ const canvas = document.createElement('canvas'); >+ document.body.appendChild(canvas); >+ const context = canvas.getContext("2d"); >+ context.fillStyle = "red"; >+ context.fillRect(0, 0, 10, 10); >+ const stream = canvas.captureStream(); >+ recorder = new MediaRecorder(stream); >+ } catch(e) {} >+ idl_array.add_objects({ MediaRecorder: [recorder] }); >+ >+ try { >+ blob = new BlobEvent("type", { >+ data: new Blob(), >+ timecode: performance.now(), >+ }); >+ } catch(e) {} >+ idl_array.add_objects({ BlobEvent: [blob] }); >+ >+ try { >+ error = new MediaRecorderErrorEvent("type", {}); >+ } catch(e) {} >+ idl_array.add_objects({ MediaRecorderErrorEvent: [error] }); >+ } >+); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/w3c-import.log >new file mode 100644 >index 0000000000000000000000000000000000000000..6410f9596886e4ab15b4baa99e2390587b4f7bed >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/w3c-import.log >@@ -0,0 +1,19 @@ >+The tests in this directory were imported from the W3C repository. >+Do NOT modify these tests directly in WebKit. >+Instead, create a pull request on the WPT github: >+ https://github.com/web-platform-tests/wpt >+ >+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport >+ >+Do NOT modify or remove this file. >+ >+------------------------------------------------------------------------ >+Properties requiring vendor prefixes: >+None >+Property values requiring vendor prefixes: >+None >+------------------------------------------------------------------------ >+List of files: >+/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html >+/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml >+/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189526
:
349481
|
349570
| 349571