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

Unified Diff: LayoutTests/media/video-click-dblckick-standalone.html

Issue 208483002: Implement the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cancel activation behavior in a failing fullscreen test Created 6 years, 9 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: LayoutTests/media/video-click-dblckick-standalone.html
diff --git a/LayoutTests/media/video-click-dblckick-standalone.html b/LayoutTests/media/video-click-dblckick-standalone.html
deleted file mode 100644
index 7fc83d866efba6c8110f6b889aba7f1219a597ea..0000000000000000000000000000000000000000
--- a/LayoutTests/media/video-click-dblckick-standalone.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<html>
- <head>
- <script src=media-file.js></script>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- var video;
- function log(msg)
- {
- document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
- }
-
- function test()
- {
- video = document.getElementById('fr').contentDocument.getElementsByTagName('video')[0];
- if (video.readyState >= 4)
- test2();
- else
- video.addEventListener('canplaythrough', test2);
- }
- function test2()
- {
- var click = document.createEvent("MouseEvents");
- click.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, document);
- video.dispatchEvent(click);
- if (video.paused) {
- log("PASS: video is paused.");
- test3();
- } else {
- log("FAIL: video should be paused");
- video.addEventListener('pause', test3);
- video.pause();
- }
- }
- function test3()
- {
- var doubleClick = document.createEvent("MouseEvents");
- doubleClick.initMouseEvent("dblclick", true, true, window, 2, 0, 0, 0, 0, false, false, false, false, 0, document);
- video.dispatchEvent(doubleClick);
- if (!video.paused)
- log("PASS: video is playing");
- else
- log("FAIL: video should be playing");
-
- if (window.testRunner)
- testRunner.notifyDone();
- }
- </script>
- </head>
- <body>
- <iframe id="fr"></iframe>
- <script>
- var frame = document.getElementById("fr");
- frame.src = findMediaFile("video", "content/test");
- frame.addEventListener("load", test);
- </script>
- <p>This tests that clicking on a standalone video will pause and double-clicking will play.</p>
- <pre id="console"></pre>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698