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

Side by Side Diff: LayoutTests/http/tests/security/document-origin-domain.html

Issue 758913002: Implement the 'document.origin' accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moar assertions. Created 6 years 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 <head>
3 <title>document.origin + document.domain</title>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 <script>
7 if (document.location.hostname == "127.0.0.1")
8 document.location = "http://subdomain.example.test:8000/security/doc ument-origin-domain.html";
9 </script>
10 </head>
11 <body>
12
13 <script>
14 test(function() {
15 assert_equals(document.origin, 'http://subdomain.example.test:8000');
16 assert_equals(document.domain, 'subdomain.example.test');
17
18 document.domain = 'example.test';
19
20 assert_equals(document.origin, 'http://subdomain.example.test:8000');
21 assert_equals(document.domain, 'example.test');
22 }, 'document.domain does not effect document.origin.');
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698