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

Side by Side Diff: third_party/WebKit/LayoutTests/media/viewport-in-standalone-media-document.html

Issue 2094993002: Convert video-volume*, video-width* and viewport* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>This tests that a standalone media document has viewport settings.</title >
3 <head> 3 <script src="../resources/testharness.js"></script>
4 <script src="../media/media-file.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 5 <script src="media-file.js"></script>
6 (Please avoid writing new tests using video-test.js) --> 6 <iframe></iframe>
7 <script src="../media/video-test.js"></script> 7 <script>
8 <script> 8 async_test(function(t) {
9 var metaElement; 9 var iframe = document.querySelector("iframe");
10 var standaloneMediaDocument;
11 var skipOnFirstEmptyLoad = 0;
12 10
13 function frameLoaded() 11 iframe.onload = t.step_func_done(function() {
14 { 12 var metaElement = iframe.contentDocument.querySelector("meta");
15 if (++skipOnFirstEmptyLoad == 1) 13 assert_equals(metaElement.name, "viewport");
16 return; 14 assert_equals(metaElement.content, "width=device-width");
15 });
17 16
18 standaloneMediaDocument = document.getElementById("videoframe"). contentDocument; 17 iframe.src = findMediaFile("video", "content/test");
19 metaElement = standaloneMediaDocument.querySelector("meta"); 18 });
20 19 </script>
21 testExpected("metaElement.name", "viewport");
22 testExpected("metaElement.content", "width=device-width");
23
24 endTest();
25 }
26 </script>
27 </head>
28 <body>
29 <p>
30 This tests that a standalone media document has viewport settings.
31 </p>
32 <iframe id="videoframe" onload="frameLoaded()"></iframe>
33 <script>
34 document.getElementById("videoframe").src = findMediaFile("video", " content/test");
35 </script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698