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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html b/third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html
index 4b4869c7f79f4450fd15803885265d5d5534cbf6..84c06ba008ad821444dfba36d6f2d846e8f8f000 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html
@@ -9,14 +9,21 @@
<script>
if (document.location.hostname == "127.0.0.1") {
- document.location.hostname = "subdomain.example.test";
+ document.location.hostname = "sub,.subdomain.example.test";
} else {
test(function() {
+ // Properly canonicalize the host.
+ assert_equals(document.location.hostname, "sub%2C.subdomain.example.test");
+
document.domain = 'EXAMPLE.TEST';
assert_equals(document.domain, 'example.test');
document.domain = 'subdomain.eXamPle.tEst';
assert_equals(document.domain, 'subdomain.example.test');
+
+ document.domain = 'sub,.subdomain.example.test';
+ assert_equals(document.domain, 'sub%2C.subdomain.example.test');
+
}, 'document.domain goes through proper canonicalization.');
}
</script>
« 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