Modified: trunk/LayoutTests/ChangeLog (120096 => 120097)
--- trunk/LayoutTests/ChangeLog 2012-06-12 18:24:27 UTC (rev 120096)
+++ trunk/LayoutTests/ChangeLog 2012-06-12 18:52:11 UTC (rev 120097)
@@ -1,3 +1,13 @@
+2012-06-12 Anna Cavender <[email protected]>
+
+ Separate RemoveID test cases.
+ https://bugs.webkit.org/show_bug.cgi?id=88798
+
+ Reviewed by Eric Carlson.
+
+ * http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt:
+ * http/tests/media/media-source/video-media-source-add-and-remove-ids.html:
+
2012-06-12 Brady Eidson <[email protected]>
<rdar://problem/11593686> and https://bugs.webkit.org/show_bug.cgi?id=88683
Modified: trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt (120096 => 120097)
--- trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt 2012-06-12 18:24:27 UTC (rev 120096)
+++ trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids-expected.txt 2012-06-12 18:52:11 UTC (rev 120097)
@@ -20,17 +20,35 @@
Test that SourceIDs can't be added while in the ended state.
Got expected exception Error: INVALID_STATE_ERR: DOM Exception 11
-running testRemoveIdFailureCases
+running testRemoveEmptyId
EVENT(loadstart)
EVENT(webkitsourceopen)
Test empty ID case
Got expected exception Error: INVALID_ACCESS_ERR: DOM Exception 15
+
+running testRemoveNonexistentId
+EVENT(loadstart)
+EVENT(webkitsourceopen)
Test removing an ID that was never added.
Got expected exception Error: SYNTAX_ERR: DOM Exception 12
+
+running testRemoveAgain
+EVENT(loadstart)
+EVENT(webkitsourceopen)
+Test removing an ID that was already removed.
Got expected exception Error: SYNTAX_ERR: DOM Exception 12
-Test adding the same ID again.
+
+running testRemoveIdAfterEnded
+EVENT(loadstart)
+EVENT(webkitsourceopen)
Test that an ID can be removed while in the ended state.
+running testAddIdAfterRemoving
+EVENT(loadstart)
+EVENT(webkitsourceopen)
+Test that an ID can be added again after it is removed.
+Unexpected exception: Error: QUOTA_EXCEEDED_ERR: DOM Exception 22
+
running testAppendFailureCases
EVENT(loadstart)
EVENT(webkitsourceopen)
Modified: trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids.html (120096 => 120097)
--- trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids.html 2012-06-12 18:24:27 UTC (rev 120096)
+++ trunk/LayoutTests/http/tests/media/media-source/video-media-source-add-and-remove-ids.html 2012-06-12 18:52:11 UTC (rev 120097)
@@ -107,28 +107,57 @@
runNextTestCase();
}
- function testRemoveIdFailureCases(runNextTestCase, videoTag)
+ function testRemoveEmptyId(runNextTestCase, videoTag)
{
consoleWrite("Test empty ID case");
expectExceptionOnRemoveId(videoTag, "", DOMException.INVALID_ACCESS_ERR);
+ runNextTestCase();
+ }
+
+ function testRemoveNonexistentId(runNextTestCase, videoTag)
+ {
consoleWrite("Test removing an ID that was never added.");
expectExceptionOnRemoveId(videoTag, "345", DOMException.SYNTAX_ERR);
+ runNextTestCase();
+ }
+
+ function testRemoveAgain(runNextTestCase, videoTag)
+ {
+ consoleWrite("Test removing an ID that was already removed.");
videoTag.webkitSourceAddId("123", defaultSourceMimetype);
videoTag.webkitSourceRemoveId("123");
expectExceptionOnRemoveId(videoTag, "123", DOMException.SYNTAX_ERR);
- consoleWrite("Test adding the same ID again.");
- videoTag.webkitSourceAddId("123", defaultSourceMimetype);
+ runNextTestCase();
+ }
+ function testRemoveIdAfterEnded(runNextTestCase, videoTag)
+ {
consoleWrite("Test that an ID can be removed while in the ended state.");
+ videoTag.webkitSourceAddId("123", defaultSourceMimetype);
videoTag.webkitSourceEndOfStream(videoTag.EOS_NO_ERROR);
videoTag.webkitSourceRemoveId("123");
runNextTestCase();
}
+ function testAddIdAfterRemoving(runNextTestCase, videoTag)
+ {
+ consoleWrite("Test that an ID can be added again after it is removed.");
+ videoTag.webkitSourceAddId("123", defaultSourceMimetype);
+ videoTag.webkitSourceRemoveId("123");
+
+ try {
+ videoTag.webkitSourceAddId("123", defaultSourceMimetype);
+ } catch (e) {
+ consoleWrite("Unexpected exception: " + e);
+ }
+
+ runNextTestCase();
+ }
+
function testAppendFailureCases(runNextTestCase, videoTag)
{
var initSegment = segmentHelper.initSegment;
@@ -172,7 +201,11 @@
var testCases = [
testAddIdFailureCases,
- testRemoveIdFailureCases,
+ testRemoveEmptyId,
+ testRemoveNonexistentId,
+ testRemoveAgain,
+ testRemoveIdAfterEnded,
+ testAddIdAfterRemoving,
testAppendFailureCases,
];