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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html

Issue 2578653002: Do not call lower() on domains set from DOM after canonicalization (Closed)
Patch Set: add test Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 </script> 6 </script>
7 </head> 7 </head>
8 <body> 8 <body>
9 9
10 <script> 10 <script>
11 if (document.location.hostname == "127.0.0.1") { 11 if (document.location.hostname == "127.0.0.1") {
12 document.location.hostname = "subdomain.example.test"; 12 document.location.hostname = "sub,.subdomain.example.test";
13 } else { 13 } else {
14 test(function() { 14 test(function() {
15 // Properly canonicalize the host.
16 assert_equals(document.location.hostname, "sub%2C.subdomain.example.test") ;
17
15 document.domain = 'EXAMPLE.TEST'; 18 document.domain = 'EXAMPLE.TEST';
16 assert_equals(document.domain, 'example.test'); 19 assert_equals(document.domain, 'example.test');
17 20
18 document.domain = 'subdomain.eXamPle.tEst'; 21 document.domain = 'subdomain.eXamPle.tEst';
19 assert_equals(document.domain, 'subdomain.example.test'); 22 assert_equals(document.domain, 'subdomain.example.test');
23
24 document.domain = 'sub,.subdomain.example.test';
25 assert_equals(document.domain, 'sub%2C.subdomain.example.test');
26
20 }, 'document.domain goes through proper canonicalization.'); 27 }, 'document.domain goes through proper canonicalization.');
21 } 28 }
22 </script> 29 </script>
23 30
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698