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

Unified Diff: LayoutTests/http/tests/security/suborigins/resources/cors-script-suborigin.php

Issue 1180923003: Add window access checks for Suborigins (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests on Windows Created 5 years, 6 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/suborigins/resources/cors-script-suborigin.php
diff --git a/LayoutTests/http/tests/security/resources/cors-script.php b/LayoutTests/http/tests/security/suborigins/resources/cors-script-suborigin.php
similarity index 75%
copy from LayoutTests/http/tests/security/resources/cors-script.php
copy to LayoutTests/http/tests/security/suborigins/resources/cors-script-suborigin.php
index 9f829dac66ee224dbcd0d7a3f2dd98aff58189c3..86fc23ae6f4ce473bf2d81387322f9fc1b61eee4 100644
--- a/LayoutTests/http/tests/security/resources/cors-script.php
+++ b/LayoutTests/http/tests/security/suborigins/resources/cors-script-suborigin.php
@@ -16,7 +16,7 @@ if ($_SERVER['HTTP_ORIGIN'] && $_GET['value_cors']) {
if ($value)
echo "result = \"" . $value . "\";";
else if (strtolower($_GET["fail"]) == "true")
- echo "throw({toString: function(){ return 'SomeError' }});";
+ echo "try { throw({toString: function(){ return 'SomeError' }}); } catch(e) { catchError(e); }";
else
- echo "alert('script ran.');";
+ echo "window.parent.secret = 'I am a secret'; parent.postMessage('Done', '*');";
?>

Powered by Google App Engine
This is Rietveld 408576698