Index: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html |
index ce8f01442853cf6ac559d938c0303b5054ab927e..629299919fbfa8daa2b99d65be8ec906f7b1e207 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html |
@@ -64,10 +64,16 @@ |
assert_greater_than_equal(mediaElement.duration, 2.0, 'Duration is >2.0s.'); |
test.waitForCurrentTimeChange(mediaElement, function() |
{ |
- // Update duration. |
- mediaSource.duration = 1.5; |
- seekToSpecifiedTimeSetEOSAndVerifyDone(test, mediaElement, mediaSource, 1.8); |
+ // Reduce duration after removing media beyond the new duration. |
+ test.expectEvent(sourceBuffer, 'updateend', 'remove end'); |
+ sourceBuffer.remove(1.5, +Infinity); |
+ test.waitForExpectedEvents(function() |
+ { |
+ mediaSource.duration = 1.5; |
+ seekToSpecifiedTimeSetEOSAndVerifyDone(test, mediaElement, mediaSource, 1.8); |
+ }); |
}); |
+ |
}); |
}, 'Test seeking beyond updated media duration.'); |
@@ -85,7 +91,7 @@ |
{ |
test.waitForCurrentTimeChange(mediaElement, function() |
{ |
- seekToSpecifiedTimeSetEOSAndVerifyDone(test, mediaElement, mediaSource, mediaSource.duration, mediaSource.duration + 0.1); |
+ seekToSpecifiedTimeSetEOSAndVerifyDone(test, mediaElement, mediaSource, mediaSource.duration + 0.1); |
}); |
}); |