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

Unified Diff: LayoutTests/media/media-continues-playing-after-replace-source.html

Issue 349973006: HTMLMediaElement::webMediaPlayer() should never be null if m_readyState >= HAVE_METADATA (multiple … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/media/media-continues-playing-after-replace-source-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/media-continues-playing-after-replace-source.html
diff --git a/LayoutTests/media/media-continues-playing-after-replace-source.html b/LayoutTests/media/media-continues-playing-after-replace-source.html
index ffd77c136717172224e798907bc5da68c4c1ad99..8fef6fb166b77aa22526c6a529072bc4ef215b77 100644
--- a/LayoutTests/media/media-continues-playing-after-replace-source.html
+++ b/LayoutTests/media/media-continues-playing-after-replace-source.html
@@ -44,17 +44,16 @@
++timeupdateEventCount;
if (timeupdateEventCount-skippedCount == 1) {
- // First time update after source replacement should be 0.
- // We allow one late time update to come in from the previous
- // source element. This was done to help the cr-linux test
- // pass, and does not necessarily indicate a problem.
+ // If the media play has started it should continue even if
+ // source was replaced. Wait for two timeupdate events to
+ // make sure the same source keeps playing.
if (sourceReplaced) {
- if (skippedCount >= 1 || this.currentTime == 0) {
+ if (skippedCount >= 1 || this.currentTime > 0) {
testElement = this;
- testExpected("testElement.currentTime", 0);
+ testExpected("testElement.currentTime", 0, '>');
} else {
- // The time is not 0 as expected. Hope this is a
- // late update from the previous source.
+ // The time is not 0 as expected. Make sure same
+ // source keeps playing by waiting for one more event.
++skippedCount;
}
}
« no previous file with comments | « no previous file | LayoutTests/media/media-continues-playing-after-replace-source-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698