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

Unified Diff: third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html

Issue 2108993003: Convert video-controls* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 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
Index: third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html b/third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html
index 63af21954188e79ef383506229ed9781f2555a68..0e9fe9466df3b2c574692dabcc91f44ebd73c3c2 100644
--- a/third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html
+++ b/third_party/WebKit/LayoutTests/media/video-controls-attribute-fullscreen.html
@@ -1,40 +1,24 @@
<!doctype html>
-<html>
- <head>
- <title>Test that the controls attribute is not affected by fullscreen</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 start()
- {
- findMediaElement();
- video.src = findMediaFile("video", "content/test");
- waitForEvent("loadeddata", loadeddata);
- }
+<title>Test that the controls attribute is not affected by fullscreen</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");
+ video.src = findMediaFile("video", "content/test");
+ video.onloadeddata = t.step_func(function() {
+ assert_false(video.controls);
+ video.onwebkitfullscreenchange = t.step_func_done(function() {
+ assert_false(video.controls);
+ });
- function loadeddata()
- {
- testExpected("video.controls", false);
- waitForEventOnce("webkitfullscreenchange", fullscreenchange);
- document.addEventListener("click", function()
- {
- run("video.webkitRequestFullscreen()");
- });
- eventSender.mouseDown();
- eventSender.mouseUp();
- }
-
- function fullscreenchange()
- {
- testExpected("video.controls", false);
- endTest();
- }
- </script>
- </head>
- <body onload="start()">
- <p>Test that the controls attribute is not affected by fullscreen</p>
- <video></video>
- </body>
-</html>
+ document.onclick = t.step_func(function() {
+ video.webkitRequestFullscreen();
+ });
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698