Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash.html b/third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c558972e11ae140f3d11d347cb0b02c3e522a031 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash.html |
| @@ -0,0 +1,21 @@ |
| +<!DOCTYPE html> |
| +<title>Setting preload=metadata after calling load() w/ preload=none</title> |
| +<script src="media-file.js"></script> |
| +<p>PASS if no crash in Debug.</p> |
| +<script> |
| +if (window.testRunner) { |
| + testRunner.waitUntilDone(); |
| + testRunner.dumpAsText(); |
| +} |
| +var video = document.createElement('video'); |
| +video.preload = "none"; |
| +document.addEventListener('DOMContentLoaded', function() { |
|
philipj_slow
2015/12/02 13:41:14
Any particular reason to wait for DOMContentLoaded
|
| + video.src = findMediaFile('video', 'content/test'); |
| + video.load(); |
|
philipj_slow
2015/12/02 13:41:14
Setting the src attribute should have implicitly d
fs
2015/12/02 14:50:49
It seems it is, yes.
|
| + video.preload = "metadata"; |
| + |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| +}); |
| +document.body.appendChild(video); |
|
philipj_slow
2015/12/02 13:41:14
Does it need to be in the document?
|
| +</script> |