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

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

Issue 2447293002: Don't call lower() on KURL protocol/host (Closed)
Patch Set: add canonicalization layout test 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 side-by-side diff with in-line comments
Download patch
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
new file mode 100644
index 0000000000000000000000000000000000000000..4b4869c7f79f4450fd15803885265d5d5534cbf6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/document-domain-canonicalizes.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script>
+ </script>
+</head>
+<body>
+
+<script>
+if (document.location.hostname == "127.0.0.1") {
+ document.location.hostname = "subdomain.example.test";
+} else {
+ test(function() {
+ document.domain = 'EXAMPLE.TEST';
+ assert_equals(document.domain, 'example.test');
+
+ document.domain = 'subdomain.eXamPle.tEst';
+ assert_equals(document.domain, 'subdomain.example.test');
+ }, 'document.domain goes through proper canonicalization.');
+}
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698