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

Unified Diff: LayoutTests/media/video-played-reset.html

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 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 | « LayoutTests/media/video-played.js ('k') | LayoutTests/media/video-seek-by-small-increment.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/video-played-reset.html
diff --git a/LayoutTests/media/video-played-reset.html b/LayoutTests/media/video-played-reset.html
index dbc25e6c7e8a7d527564690040b6e6c6df72712f..3e695f102573b1b330a428041e427f37605bdd03 100644
--- a/LayoutTests/media/video-played-reset.html
+++ b/LayoutTests/media/video-played-reset.html
@@ -5,19 +5,19 @@
<script src=video-test.js></script>
<script src=video-played.js></script>
<script>
-
- var testFunctions =
- [
+
+ var testFunctions =
+ [
PlayWithNoRanges,
ResetToAVideoSource,
JumpAndPlayFwd,
ResetToAnEmptyVideoSource
];
-
+
// NOTE: Result details are not printed for this test because time values are different from machine
// to machine and run to run. Commenting out the following line turns on detailed logging back on, which
// can be useful for debugging test failure.
- disableFullTestDetailsPrinting();
+ disableFullTestDetailsPrinting();
function PlayWithNoRanges()
{
@@ -29,11 +29,11 @@
startPlayingInNewRange();
}
-
+
function ResetToAVideoSource()
{
consoleWrite("<br><b><em>Test to reset to non empty video source</em></b>");
-
+
timeRangeCount = currentTimeRange = 0;
expectedStartTimes = new Array();
expectedEndTimes = new Array();
@@ -43,6 +43,8 @@
var mediaFile = findMediaFile("video", "content/test");
runSilently("video.src = \"" + mediaFile + "\"");
+
+ waitForEventOnce("canplay", canplay);
run("video.load()"); // Triggers canplay()
}
@@ -63,7 +65,7 @@
function ResetToAnEmptyVideoSource()
{
consoleWrite("<br><b><em>Test to reset to an empty video source</em></b>");
-
+
willPauseInExistingRange = false;
willExtendAnExistingRange = false;
timeRangeCount = currentTimeRange = 0;
« no previous file with comments | « LayoutTests/media/video-played.js ('k') | LayoutTests/media/video-seek-by-small-increment.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698