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

Side by Side Diff: LayoutTests/http/tests/security/suborigins/suborigin-allow-same-suborigin-access.html

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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Allow suborigin in HTTP header</title>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <script>
10
11 var tests;
12 var nextTest = function() {
13 var test = tests.shift();
14 if (test)
15 test();
16 }
17
18 tests = [
19 function() {
20 async_test(function(t) {
21 window.onmessage = t.step_func(function(event) {
22 assert_equals(event.data, 'I am a secret');
23 t.done();
24 nextTest();
25 });
26 var iframe = document.createElement('iframe');
27 iframe.src = "resources/iframe-reaches-into-parent.php?suborigin=foo bar&childsuborigin=foobar";
28 document.body.appendChild(iframe);
29 }, 'iframe reaches into parent')
30 },
31 function() {
32 async_test(function(t) {
33 window.onmessage = t.step_func(function(event) {
34 assert_equals(event.data, 'I am a secret');
35 t.done();
36 nextTest();
37 });
38 var iframe = document.createElement('iframe');
39 iframe.src = "resources/reach-into-iframe.php?suborigin=foobar&child suborigin=foobar";
40 document.body.appendChild(iframe);
41 }, 'Parent reaches into iframe')
42 }
43 ];
44
45 nextTest();
46 </script>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698