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

Side by Side Diff: LayoutTests/http/tests/security/resources/cors-script.php

Issue 19596004: Allow sites to enable 'window.onerror' handlers for cross-domain scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rework. Created 7 years, 4 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 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); 2 if (strtolower($_GET["cors"]) != "false") {
3 header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
4 }
3 header("Content-Type: application/javascript"); 5 header("Content-Type: application/javascript");
4 if (strtolower($_GET["fail"]) == "true") 6 if (strtolower($_GET["fail"]) == "true")
5 echo "throw({toString: function(){ return 'SomeError' }});"; 7 echo "throw({toString: function(){ return 'SomeError' }});";
6 else 8 else
7 echo "alert('script ran.');"; 9 echo "alert('script ran.');";
8 ?> 10 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698