Diff
Modified: trunk/LayoutTests/ChangeLog (220911 => 220912)
--- trunk/LayoutTests/ChangeLog 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/ChangeLog 2017-08-18 09:24:35 UTC (rev 220912)
@@ -1,3 +1,17 @@
+2017-08-18 Ms2ger <[email protected]>
+
+ Update track-datacue.html test to the current code.
+ https://bugs.webkit.org/show_bug.cgi?id=175624
+
+ Reviewed by Eric Carlson.
+
+ * media/track/track-datacue-expected.txt: rebaselined.
+ * media/track/track-datacue.html: updated for IDL, exception changes, addition of a new constructor.
+ * platform/gtk/TestExpectations: removed failure expectation.
+ * platform/ios/TestExpectations: enable.
+ * platform/mac/TestExpectations: enable.
+ * platform/win/TestExpectations: enable.
+
2017-08-18 Ms2ger <[email protected]>
[GTK] Remove some obsolete expected failures.
Modified: trunk/LayoutTests/media/track/track-datacue-expected.txt (220911 => 220912)
--- trunk/LayoutTests/media/track/track-datacue-expected.txt 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/media/track/track-datacue-expected.txt 2017-08-18 09:24:35 UTC (rev 220912)
@@ -2,7 +2,7 @@
*** Test DataCue's TextTrackCue interface.
-EXPECTED (cue instanceof '[object TextTrackCueConstructor]') OK
+EXPECTED (cue instanceof 'function TextTrackCue() { [native code] }') OK
EXPECTED (cue.track == 'null') OK
EXPECTED (cue.id == '') OK
EXPECTED (cue.startTime == '3') OK
@@ -10,7 +10,7 @@
EXPECTED (cue.pauseOnExit == 'false') OK
*** Test DataCue interface.
-EXPECTED (cue instanceof '[object DataCueConstructor]') OK
+EXPECTED (cue instanceof 'function DataCue() { [native code] }') OK
EXPECTED (new Uint8Array(cue.data).length == '5') OK
EXPECTED (new Uint8Array(cue.data)[0] == '4') OK
EXPECTED (new Uint8Array(cue.data)[1] == '5') OK
@@ -29,13 +29,16 @@
EXPECTED ((new Uint8Array(cue.data))[0] == '7') OK
*** Throw exception if data is not an ArrayBuffer.
-TEST(cue.data = "" THROWS('TypeError: Type error') OK
-TEST(cue.data = '') THROWS('TypeError: Type error') OK
-TEST(cue.data = "" THROWS('TypeError: Type error') OK
-TEST(badCue = new DataCue(1, 2, null)) THROWS('TypeError: Type error') OK
-TEST(badCue = new DataCue(1, 2, 'test')) THROWS('TypeError: Type error') OK
-TEST(badCue = new DataCue(1, 2, [5])) THROWS('TypeError: Type error') OK
+TEST(cue.data = "" THROWS('TypeError: The DataCue.data attribute must be an instance of ArrayBuffer') OK
+TEST(cue.data = '') THROWS('TypeError: The DataCue.data attribute must be an instance of ArrayBuffer') OK
+TEST(cue.data = "" THROWS('TypeError: The DataCue.data attribute must be an instance of ArrayBuffer') OK
+*** Constructor with value argument.
+EXPECTED (new DataCue(1, 2, null).value === 'null') OK
+EXPECTED (new DataCue(1, 2, 'test').value === 'test') OK
+EXPECTED (new DataCue(1, 2, [5]).value.length == '1') OK
+EXPECTED (new DataCue(1, 2, [5]).value[0] == '5') OK
+
*** Test adding DataCue to track with kind = 'metadata'.
EXPECTED (cue.track == '[object TextTrack]') OK
EXPECTED (metadataTrack.cues[0] == '[object DataCue]') OK
Modified: trunk/LayoutTests/media/track/track-datacue.html (220911 => 220912)
--- trunk/LayoutTests/media/track/track-datacue.html 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/media/track/track-datacue.html 2017-08-18 09:24:35 UTC (rev 220912)
@@ -41,14 +41,16 @@
testExpected("(new Uint8Array(cue.data))[0]", 7);
consoleWrite("<br>*** Throw exception if data is not an ArrayBuffer.");
- var error = "'TypeError: Type error'";
+ var error = "'TypeError: The DataCue.data attribute must be an instance of ArrayBuffer'";
testException("cue.data = "" error);
testException("cue.data = ''", error);
testException("cue.data = "" error);
- testException("badCue = new DataCue(1, 2, null)", error);
- testException("badCue = new DataCue(1, 2, 'test')", error);
- testException("badCue = new DataCue(1, 2, [5])", error);
+ consoleWrite("<br>*** Constructor with value argument.");
+ testExpected("new DataCue(1, 2, null).value", null, "===");
+ testExpected("new DataCue(1, 2, 'test').value", 'test', "===");
+ testArraysEqual("new DataCue(1, 2, [5]).value", [5]);
+
consoleWrite("<br>*** Test adding DataCue to track with kind = 'metadata'.");
var video = document.createElement("video");
metadataTrack = video.addTextTrack("metadata");
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (220911 => 220912)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2017-08-18 09:24:35 UTC (rev 220912)
@@ -3245,7 +3245,6 @@
webkit.org/b/168373 media/media-preload-no-delay-loadevent.html [ Failure ]
webkit.org/b/168373 media/video-background-playback.html [ Failure Timeout ]
webkit.org/b/168373 media/video-concurrent-playback.html [ Failure Timeout ]
-webkit.org/b/132055 media/track/track-datacue.html [ Failure ]
# [GTK] Some reftest fail with only one or two pixel differences in diff image
webkit.org/b/168426 fast/html/marquee-scroll.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/platform/ios/TestExpectations (220911 => 220912)
--- trunk/LayoutTests/platform/ios/TestExpectations 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2017-08-18 09:24:35 UTC (rev 220912)
@@ -159,9 +159,6 @@
platform/ios/ios/fast/text/data-detectors/phone.html [ Skip ]
platform/ios/ios/touch [ Skip ]
-# WebKitDataCue is supported, not DataCue
-media/track/track-datacue.html
-
# Codecs not supported
media/media-can-play-ogg.html [ WontFix ]
media/media-can-play-flac-audio.html [ WontFix ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (220911 => 220912)
--- trunk/LayoutTests/platform/mac/TestExpectations 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2017-08-18 09:24:35 UTC (rev 220912)
@@ -800,9 +800,6 @@
## --- Start unimplemented media tests ---
webkit.org/b/91611 media/media-higher-prio-audio-stream.html [ Skip ]
-# WebKitDataCue is supported, not DataCue
-media/track/track-datacue.html [ Skip ]
-
webkit.org/b/158836 imported/w3c/web-platform-tests/encrypted-media [ Skip ]
## --- End unimplemeted media tests ---
Modified: trunk/LayoutTests/platform/win/TestExpectations (220911 => 220912)
--- trunk/LayoutTests/platform/win/TestExpectations 2017-08-18 09:12:38 UTC (rev 220911)
+++ trunk/LayoutTests/platform/win/TestExpectations 2017-08-18 09:24:35 UTC (rev 220912)
@@ -1049,7 +1049,6 @@
media/track/track-cues-pause-on-exit.html [ Skip ] # Timeout
media/track/track-cues-seeking.html [ Skip ] # Timeout
media/track/track-cues-sorted-before-dispatch.html [ Skip ] # Timeout
-media/track/track-datacue.html [ Skip ] # Timeout
media/track/track-forced-subtitles-in-band.html [ Skip ] # Timeout
media/track/track-in-band-style.html [ Skip ] # Timeout
media/track/track-language-preference.html [ Skip ] # Timeout