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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/post-document-to-parent.php

Issue 2370843003: Suborigin LayoutTest formatting and refactoring (Closed)
Patch Set: Created 4 years, 2 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 <?php 1 <?php
2 $suborigin = $_GET["suborigin"]; 2 $suborigin = $_GET["suborigin"];
3 $suboriginPolicy = $_GET["suboriginpolicy"]; 3 $suboriginPolicy = $_GET["suboriginpolicy"];
4 4
5 if ($_GET["suborigin"]) { 5 if ($_GET["suborigin"]) {
6 header("Suborigin: " . $suborigin . " " . $suboriginPolicy); 6 header("Suborigin: " . $suborigin . " " . $suboriginPolicy);
7 } 7 }
8 ?> 8 ?>
9 <!DOCTYPE html> 9 <!DOCTYPE html>
10 <html> 10 <html>
11 <head>
12 <meta charset="utf-8">
13 </head>
11 <script> 14 <script>
12 var type = '<?php echo $_GET["type"]; ?>'; 15 var type = '<?php echo $_GET["type"]; ?>';
13 var is_iframe = (type === 'iframe'); 16 var is_iframe = (type === 'iframe');
14 var p = window.opener; 17 var p = window.opener;
15 if (is_iframe) 18 if (is_iframe)
16 p = window.parent; 19 p = window.parent;
17 20
18 var target = "<?php if ($_GET["target"]) echo $_GET["target"]; else echo "*"; ?> "; 21 var target = '<?php if ($_GET["target"]) echo $_GET["target"]; else echo "*"; ?> ';
19 p.postMessage({ 22 p.postMessage({
20 'suborigin': document.suborigin, 23 'suborigin': document.suborigin,
21 'type': type 24 'type': type
22 }, target); 25 }, target);
23 </script> 26 </script>
24 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698