LayoutTests/imported/w3c/ChangeLog

 12018-09-11 YUHAN WU <yuhan_wu@apple.com>
 2
 3 Import media recorder api WPT tests
 4 https://bugs.webkit.org/show_bug.cgi?id=189526
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 For bug 189526
 9
 10 * resources/import-expectations.json:
 11 * web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt: Added.
 12 * web-platform-tests/mediacapture-record/BlobEvent-constructor.html: Added.
 13 * web-platform-tests/mediacapture-record/META.yml: Added.
 14 * web-platform-tests/mediacapture-record/idlharness.window-expected.txt: Added.
 15 * web-platform-tests/mediacapture-record/idlharness.window.html: Added.
 16 * web-platform-tests/mediacapture-record/idlharness.window.js: Added.
 17 (idl_array.catch):
 18 * web-platform-tests/mediacapture-record/w3c-import.log: Added.
 19
1202018-09-11 Chris Dumez <cdumez@apple.com>
221
322 Unreviewed, rebaseline imported/w3c/web-platform-tests/css/cssom/interfaces.html after r235889.

LayoutTests/imported/w3c/resources/import-expectations.json

257257 "web-platform-tests/media-capabilities": "skip",
258258 "web-platform-tests/media-source": "import",
259259 "web-platform-tests/mediacapture-image": "skip",
260  "web-platform-tests/mediacapture-record": "skip",
 260 "web-platform-tests/mediacapture-record": "import",
261261 "web-platform-tests/mediacapture-streams": "import",
262262 "web-platform-tests/mediasession": "skip",
263263 "web-platform-tests/microdata": "skip",

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor-expected.txt

 1
 2FAIL The BlobEventInit dictionary is required Can't find variable: BlobEvent
 3FAIL The BlobEventInit dictionary's data member is required. assert_throws: function "function () {
 4 new BlobEvent("type", {});
 5 }" threw object "ReferenceError: Can't find variable: BlobEvent" ("ReferenceError") expected object "TypeError" ("TypeError")
 6FAIL The BlobEvent instance's data attribute is set. Can't find variable: BlobEvent
 7

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html

 1<!doctype html>
 2<title>BlobEvent constructor</title>
 3<link rel="help" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#blob-event">
 4<script src="/resources/testharness.js"></script>
 5<script src="/resources/testharnessreport.js"></script>
 6<script>
 7test(function() {
 8 assert_equals(BlobEvent.length, 2);
 9 assert_throws(new TypeError, function() {
 10 new BlobEvent("type");
 11 });
 12 assert_throws(new TypeError, function() {
 13 new BlobEvent("type", null);
 14 });
 15 assert_throws(new TypeError, function() {
 16 new BlobEvent("type", undefined);
 17 });
 18}, "The BlobEventInit dictionary is required");
 19
 20test(function() {
 21 assert_throws(new TypeError, function() {
 22 new BlobEvent("type", {});
 23 });
 24 assert_throws(new TypeError, function() {
 25 new BlobEvent("type", { data: null });
 26 });
 27 assert_throws(new TypeError, function() {
 28 new BlobEvent("type", { data: undefined });
 29 });
 30}, "The BlobEventInit dictionary's data member is required.");
 31
 32test(function() {
 33 var blob = new Blob();
 34 var event = new BlobEvent("type", { data: blob });
 35 assert_equals(event.type, "type");
 36 assert_equals(event.data, blob);
 37}, "The BlobEvent instance's data attribute is set.");
 38</script>

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml

 1spec: https://w3c.github.io/mediacapture-record/
 2suggested_reviewers:
 3 - yellowdoge

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window-expected.txt

 1
 2FAIL 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\"")
 3[
 4 {
 5 "type": "{",
 6 "value": "{",
 7 "trivia": ""
 8 },
 9 {
 10 "type": "string",
 11 "value": "\"error\"",
 12 "trivia": ""
 13 },
 14 {
 15 "type": ":",
 16 "value": ":",
 17 "trivia": ""
 18 },
 19 {
 20 "type": "{",
 21 "value": "{",
 22 "trivia": " "
 23 },
 24 {
 25 "type": "string",
 26 "value": "\"message\"",
 27 "trivia": ""
 28 }
 29]"
 30

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.html

 1<!-- This file is required for WebKit test infrastructure to run the templated test -->
02\ No newline at end of file

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js

 1// META: script=/resources/WebIDLParser.js
 2// META: script=/resources/idlharness.js
 3
 4'use strict';
 5
 6// https://w3c.github.io/mediacapture-record/
 7
 8idl_test(
 9 ['mediastream-recording'],
 10 ['mediacapture-streams', 'FileAPI', 'html', 'dom'],
 11 idl_array => {
 12 // Ignored errors will be surfaced in idlharness.js's test_object below.
 13 let recorder, blob, error;
 14 try {
 15 const canvas = document.createElement('canvas');
 16 document.body.appendChild(canvas);
 17 const context = canvas.getContext("2d");
 18 context.fillStyle = "red";
 19 context.fillRect(0, 0, 10, 10);
 20 const stream = canvas.captureStream();
 21 recorder = new MediaRecorder(stream);
 22 } catch(e) {}
 23 idl_array.add_objects({ MediaRecorder: [recorder] });
 24
 25 try {
 26 blob = new BlobEvent("type", {
 27 data: new Blob(),
 28 timecode: performance.now(),
 29 });
 30 } catch(e) {}
 31 idl_array.add_objects({ BlobEvent: [blob] });
 32
 33 try {
 34 error = new MediaRecorderErrorEvent("type", {});
 35 } catch(e) {}
 36 idl_array.add_objects({ MediaRecorderErrorEvent: [error] });
 37 }
 38);

LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/w3c-import.log

 1The tests in this directory were imported from the W3C repository.
 2Do NOT modify these tests directly in WebKit.
 3Instead, create a pull request on the WPT github:
 4 https://github.com/web-platform-tests/wpt
 5
 6Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 7
 8Do NOT modify or remove this file.
 9
 10------------------------------------------------------------------------
 11Properties requiring vendor prefixes:
 12None
 13Property values requiring vendor prefixes:
 14None
 15------------------------------------------------------------------------
 16List of files:
 17/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/BlobEvent-constructor.html
 18/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/META.yml
 19/LayoutTests/imported/w3c/web-platform-tests/mediacapture-record/idlharness.window.js