| Index: third_party/WebKit/LayoutTests/media/video-source-inserted.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/video-source-inserted.html b/third_party/WebKit/LayoutTests/media/video-source-inserted.html
|
| index 7c93d324022987cf068203640421edca0b1b703e..f6a23e86e3c284f2a0c9464368adfd561c09f611 100644
|
| --- a/third_party/WebKit/LayoutTests/media/video-source-inserted.html
|
| +++ b/third_party/WebKit/LayoutTests/media/video-source-inserted.html
|
| @@ -1,31 +1,22 @@
|
| -<!doctype html>
|
| -<html>
|
| - <head>
|
| - <title>networkState after inserting <source> test</title>
|
| - <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
|
| - (Please avoid writing new tests using video-test.js) -->
|
| - <script src=video-test.js></script>
|
| - </head>
|
| - <body>
|
| - <video controls><source></video>
|
| +<!DOCTYPE html>
|
| +<title>Test that an empty "source" inserted when networkState is NETWORK_EMPTY triggers resource selection, immediately changing networkState to NETWORK_NO_SOURCE.</title>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<video>
|
| + <source></source>
|
| +</video>
|
| +<script>
|
| +test(function() {
|
| + // "source" inserted by the parser.
|
| + var video = document.querySelector("video");
|
| + assert_equals(video.networkState, HTMLMediaElement.NETWORK_NO_SOURCE);
|
|
|
| - <p>Test that a <source> inserted when networkState is NETWORK_NO_SOURCE triggers
|
| - resource selection, immediately changing networkState to NETWORK_NO_SOURCE.</p>
|
| + // "video" created with script.
|
| + video = document.createElement("video");
|
| + assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY);
|
|
|
| - <script>
|
| - consoleWrite("<source> inserted by the parser.");
|
| - video = document.querySelector('video');
|
| - testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "==");
|
| -
|
| - consoleWrite("<br><video> created with script.");
|
| - video = document.createElement('video');
|
| - testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_EMPTY, "==");
|
| - consoleWrite("<source> inserted by script.");
|
| - video.appendChild(document.createElement('source'));
|
| - testExpected("video.networkState", HTMLMediaElement.prototype.NETWORK_NO_SOURCE, "==");
|
| - if (window.testRunner)
|
| - testRunner.notifyDone();
|
| - </script>
|
| -
|
| - </body>
|
| -</html>
|
| + // "source" inserted by script.
|
| + video.appendChild(document.createElement("source"));
|
| + assert_equals(video.networkState, HTMLMediaElement.NETWORK_NO_SOURCE);
|
| +});
|
| +</script>
|
|
|