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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/the-location-interface/security_location_0.htm

Issue 2446483002: Import wpt@c5a14f553cba5f197743b9af605a84eddd8692a2 (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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Location interface Security</title> 4 <title>Location interface Security</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#security-loca tion" /> 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#security-loca tion" />
7 <meta name="assert" content="access location object from different origins d oesn't raise SECURITY_ERR exception" /> 7 <meta name="assert" content="access location object from different origins d oesn't raise SECURITY_ERR exception" />
8 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script> 9 <script src="/resources/testharnessreport.js"></script>
10 </head> 10 </head>
11 <body> 11 <body>
12 <p>Access location object from different origins doesn't raise SECURITY_ERR exception</p> 12 <p>Access location object from different origins doesn't raise SECURITY_ERR exception</p>
13 <div id=log></div> 13 <div id=log></div>
14 <script src="/common/get-host-info.sub.js"></script> 14 <script src="/common/get-host-info.sub.js"></script>
15 <script> 15 <script>
16 var runTest = async_test("Accessing location object from different origins doesn't raise SECURITY_ERR exception").step_func_done(function() { 16 var runTest = async_test("Accessing location object from different origins doesn't raise SECURITY_ERR exception").step_func_done(function() {
17 var frame = document.getElementById('testframe'); 17 var frame = document.getElementById('testframe');
18 frame.setAttribute('onload', ''); 18 frame.setAttribute('onload', '');
19 frame.contentWindow.location = get_host_info().HTTP_REMOTE_ORIGIN + "/"; 19 frame.contentWindow.location = get_host_info().HTTP_REMOTE_ORIGIN + "/";
20 }); 20 });
21 </script> 21 </script>
22 <iframe id='testframe' onload="runTest()">Test Frame</iframe> 22 <iframe id='testframe' onload="runTest()">Test Frame</iframe>
23 <script> 23 <script>
24 document.getElementById('testframe').setAttribute('src', get_host_info().H TTP_REMOTE_ORIGIN + '/'); 24 document.getElementById('testframe').setAttribute('src', get_host_info().H TTP_REMOTE_ORIGIN + '/');
25 </script> 25 </script>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698