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

Side by Side Diff: LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php

Issue 520433002: Output silence if the MediaElementAudioSourceNode has a different origin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 <?php 1 <?php
2 2
3 if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") {
4 # No preflights should happen.
5 echo "FAIL";
6 exit;
7 }
8
9 if (isset($_GET['with_credentials'])) { 3 if (isset($_GET['with_credentials'])) {
10 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); 4 header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
11 header("Access-Control-Allow-Credentials: true"); 5 header("Access-Control-Allow-Credentials: true");
12 } else { 6 } else {
13 header("Access-Control-Allow-Origin: *"); 7 header("Access-Control-Allow-Origin: *");
14 } 8 }
15 @include("../../media/resources/serve-video.php"); 9
10 $name = 'laughter.wav';
11 $fp = fopen($name, 'rb');
12
13 header("Content-Type: audio/x-wav");
14 header("Content-Length: " . filesize($name));
15
16 fpassthru($fp);
17 exit;
16 ?> 18 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698