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

Unified Diff: third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html

Issue 2123573002: Convert video-[enter, mouse, scales]* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
diff --git a/third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html b/third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
index 4c1c94213502067e105548ada4b9024d932e8ffd..b6cd9a4fb9bbc18953d046e914d540f6c425e215 100644
--- a/third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
+++ b/third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture.html
@@ -1,31 +1,20 @@
-<html>
- <head>
- <title>Test webkitRequestFullscreen() without any user gesture.</title>
- <script src=media-file.js></script>
- <!-- 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>
- <script>
- function canplaythrough()
- {
- consoleWrite("");
- consoleWrite("* No user gesture initiated");
- testExpected("video.paused", true);
- run("video.webkitRequestFullscreen()");
- waitForEvent('webkitfullscreenerror', endTest);
- }
+<!DOCTYPE html>
+<title>Test webkitRequestFullscreen() without any user gesture.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video></video>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
- function start()
- {
- findMediaElement();
- waitForEvent('canplaythrough', canplaythrough);
- video.src = findMediaFile("video", "content/test");
- }
- </script>
- </head>
+ video.oncanplaythrough = t.step_func(function() {
+ // No user gesture initiated.
+ assert_true(video.paused);
+ video.webkitRequestFullscreen();
+ video.onwebkitfullscreenerror = t.step_func_done();
+ });
- <body onload="start()">
- <p>Test webkitRequestFullscreen() without any user gesture.</p>
- <video controls></video>
- </body>
-</html>
+ video.src = findMediaFile("video", "content/test");
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-enter-fullscreen-without-user-gesture-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698