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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
diff --git a/LayoutTests/http/tests/security/resources/video-cross-origin-allow.php b/LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
similarity index 58%
copy from LayoutTests/http/tests/security/resources/video-cross-origin-allow.php
copy to LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
index 056ddb51727aa1fa5648743b24aa8fabfbf4e740..3fa058ceeb005431eff7e2e25aa1c5a24663ba98 100644
--- a/LayoutTests/http/tests/security/resources/video-cross-origin-allow.php
+++ b/LayoutTests/http/tests/security/resources/webaudio/media-element-cross-origin-allow.php
@@ -1,16 +1,18 @@
<?php
-if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") {
- # No preflights should happen.
- echo "FAIL";
- exit;
-}
-
if (isset($_GET['with_credentials'])) {
header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
header("Access-Control-Allow-Credentials: true");
} else {
header("Access-Control-Allow-Origin: *");
}
-@include("../../media/resources/serve-video.php");
+
+$name = 'laughter.wav';
+$fp = fopen($name, 'rb');
+
+header("Content-Type: audio/x-wav");
+header("Content-Length: " . filesize($name));
+
+fpassthru($fp);
+exit;
?>

Powered by Google App Engine
This is Rietveld 408576698