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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-autoplay-experiment-modes.html

Issue 1785953002: Ignore viewport meta tags when Request Desktop Site is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change loop style Created 4 years, 8 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 <html> 1 <html>
2 <video autoplay controls></video> 2 <video autoplay controls></video>
3 <script src=media-file.js></script> 3 <script src=media-file.js></script>
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) --> 5 (Please avoid writing new tests using video-test.js) -->
6 <script src=video-test.js></script> 6 <script src=video-test.js></script>
7 <body> 7 <body>
8 <pre> 8 <pre>
9 Check if the autoplay gesture override experiment works. There are a lot 9 Check if the autoplay gesture override experiment works. There are a lot
10 of config options, so this test just runs all of them. 10 of config options, so this test just runs all of them.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Also make sure that the page is visible again. Hidden pages cause the 163 // Also make sure that the page is visible again. Hidden pages cause the
164 // test to proceed very slowly. 164 // test to proceed very slowly.
165 testRunner.setPageVisibility("visible"); 165 testRunner.setPageVisibility("visible");
166 166
167 queueNextExperiment(); 167 queueNextExperiment();
168 } 168 }
169 169
170 function runOneConfig(spec) 170 function runOneConfig(spec)
171 { 171 {
172 internals.settings.setAutoplayExperimentMode(spec.experimentType); 172 internals.settings.setAutoplayExperimentMode(spec.experimentType);
173 internals.settings.setViewportMetaEnabled(true);
173 174
174 // Create, configure, and attach a media element. 175 // Create, configure, and attach a media element.
175 var element = document.createElement(spec.elementType); 176 var element = document.createElement(spec.elementType);
176 element.controls = true; 177 element.controls = true;
177 178
178 // Hide or show the page. 179 // Hide or show the page.
179 if (spec.visType == "obscured") 180 if (spec.visType == "obscured")
180 testRunner.setPageVisibility("hidden"); 181 testRunner.setPageVisibility("hidden");
181 182
182 // Pick whether the element will be visible when canPlayThrough. 183 // Pick whether the element will be visible when canPlayThrough.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 queueNextExperiment(); 332 queueNextExperiment();
332 else 333 else
333 runOneConfig(spec); 334 runOneConfig(spec);
334 } 335 }
335 336
336 window.internals.settings.setMediaPlaybackRequiresUserGesture(true); 337 window.internals.settings.setMediaPlaybackRequiresUserGesture(true);
337 runNextConfig(); 338 runNextConfig();
338 339
339 </script> 340 </script>
340 </html> 341 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698