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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/MediaStreamTrack-init.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/imported/web-platform-tests/mediacapture-streams/MediaStreamTrack-init.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/stream-api/mediastreamtrack/mediastreamtrack-init.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/MediaStreamTrack-init.html
similarity index 69%
rename from third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/stream-api/mediastreamtrack/mediastreamtrack-init.html
rename to third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/MediaStreamTrack-init.html
index 16eaadbbfb3b5ed6a100744b46b06ca84ce3c55c..2ec5a40f644f286f5e72e0ac0d931091b8cd59ae 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/stream-api/mediastreamtrack/mediastreamtrack-init.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/mediacapture-streams/MediaStreamTrack-init.html
@@ -8,7 +8,6 @@
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrack-kind">
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrack-enabled">
<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStreamTrack-readyState">
-<link rel='stylesheet' href='../../../../../resources/testharness.css' media='all'/>
</head>
<body>
<p class="instructions" style="display:none">When prompted, accept to share your video stream.</p>
@@ -17,24 +16,22 @@
object returned by the success callback in getUserMedia is correctly initialized.</p>
<div id='log'></div>
-<script src=../../../../../resources/testharness.js></script>
-<script src=../../../../../resources/testharnessreport.js></script>
-<script src=../../../../../resources/WebIDLParser.js></script>
-<script src=../../../../../resources/idlharness.js></script>
-<script src="../../../../../resources/vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
+<script src=../../../resources/testharness.js></script>
+<script src=../../../resources/testharnessreport.js></script>
+<script src=../../../resources/WebIDLParser.js></script>
+<script src=../../../resources/idlharness.js></script>
+<script src="../../../resources/vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
<script>
var t = async_test("Tests that the video MediaStreamTrack objects are properly initialized", {timeout:10000});
var track = null
var idl_array = new IdlArray();
+
idl_array.add_idls("interface EventTarget {\
void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false);\
void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false);\
boolean dispatchEvent(Event event);\
};");
-/*idl_array.add_idls("callback interface EventListener {\
- void handleEvent(Event event);\
-};");*/
idl_array.add_idls("interface MediaStreamTrack : EventTarget {\
readonly attribute DOMString kind;\
readonly attribute DOMString id;\
@@ -46,16 +43,14 @@ idl_array.add_idls("interface MediaStreamTrack : EventTarget {\
readonly attribute boolean _readonly;\
readonly attribute boolean remote;\
readonly attribute MediaStreamTrackState readyState;\
- attribute EventHandler onstarted;\
attribute EventHandler onended;\
- static sequence<SourceInfo> getSourceInfos ();\
- MediaTrackConstraints? constraints ();\
- MediaSourceStates states ();\
- (AllVideoCapabilities or AllAudioCapabilities) capabilities ();\
- void applyConstraints (MediaTrackConstraints constraints);\
attribute EventHandler onoverconstrained;\
- MediaStreamTrack clone ();\
- void stop ();\
+ MediaStreamTrack clone ();\
+ void stop ();\
+ MediaTrackCapabilities getCapabilities ();\
+ MediaTrackConstraints getConstraints ();\
+ MediaTrackSettings getSettings ();\
+ Promise<void> applyConstraints (optional MediaTrackConstraints constraints);\
};");
t.step(function () {
@@ -63,12 +58,13 @@ t.step(function () {
var videoTracks = stream.getVideoTracks();
assert_equals(videoTracks.length, 1, "There is exactly one video track in the media stream");
track = videoTracks[0];
- assert_equals(track.readyState, "live", "The track object is in live state");
- assert_equals(track.kind, "video", "The track object is of video kind");
- assert_true(track.enabled, "The track object is enabed"); // Not clear that this is required by the spec, see https://www.w3.org/Bugs/Public/show_bug.cgi?id=22212
idl_array.add_objects({MediaStreamTrack: ["track"]});
idl_array.test();
-
+ assert_equals(track.readyState, "live", "The track object is in live state");
+ assert_equals(track.kind, "video", "The track object is of video kind");
+ // Not clear that this is required by the spec,
+ // see https://www.w3.org/Bugs/Public/show_bug.cgi?id=22212
+ assert_true(track.enabled, "The track object is enabed");
t.done();
}), function (error) {});
});

Powered by Google App Engine
This is Rietveld 408576698