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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/media/video-cookie.html

Issue 2125523003: Rename setAlwaysAcceptCookies to setBlockThirdPartyCookies (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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 </head> 3 </head>
4 <body onload="loadCookie()"> 4 <body onload="loadCookie()">
5 <video id="video"></video> 5 <video id="video"></video>
6 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 6 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
7 (Please avoid writing new tests using video-test.js) --> 7 (Please avoid writing new tests using video-test.js) -->
8 <script src=../../media-resources/video-test.js></script> 8 <script src=../../media-resources/video-test.js></script>
9 <script src=../../media-resources/media-file.js></script> 9 <script src=../../media-resources/media-file.js></script>
10 <script> 10 <script>
11 if (window.testRunner) { 11 if (window.testRunner) {
12 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
13 testRunner.setAlwaysAcceptCookies(true); 13 testRunner.setBlockThirdPartyCookies(false);
14 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
15 } 15 }
16 16
17 function loadCookie () { 17 function loadCookie () {
18 var movie = findMediaFile("video", "resources/test"); 18 var movie = findMediaFile("video", "resources/test");
19 var frame = document.createElement("iframe"); 19 var frame = document.createElement("iframe");
20 document.body.appendChild(frame); 20 document.body.appendChild(frame);
21 21
22 frame.addEventListener('load', function () { 22 frame.addEventListener('load', function () {
23 video = document.getElementById('video'); 23 video = document.getElementById('video');
24 video.src="http://127.0.0.1:8000/media/resources/video-cookie-ch eck-cookie.php"; 24 video.src="http://127.0.0.1:8000/media/resources/video-cookie-ch eck-cookie.php";
25 video.play(); 25 video.play();
26 }); 26 });
27 27
28 frame.width = 0; 28 frame.width = 0;
29 frame.height = 0; 29 frame.height = 0;
30 frame.src = "http://127.0.0.1:8000/media/resources/setCookie.cgi?name=" + movie; 30 frame.src = "http://127.0.0.1:8000/media/resources/setCookie.cgi?name=" + movie;
31 } 31 }
32 32
33 waitForEvent("canplay", function () { 33 waitForEvent("canplay", function () {
34 if (window.testRunner) 34 if (window.testRunner)
35 window.testRunner.notifyDone(); 35 window.testRunner.notifyDone();
36 } ); 36 } );
37 </script> 37 </script>
38 Tests that the media player will send the relevant cookies when requesting the m edia file.<br/> 38 Tests that the media player will send the relevant cookies when requesting the m edia file.<br/>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698