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

Unified Diff: LayoutTests/http/tests/security/create-document-change-domain.html

Issue 50573004: Don't set document.domain to an IP address fragment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: missing weboriginexport header Created 7 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: LayoutTests/http/tests/security/create-document-change-domain.html
diff --git a/LayoutTests/http/tests/security/create-document-change-domain.html b/LayoutTests/http/tests/security/create-document-change-domain.html
index 8b621b46ddfacbed88dc8c5dbc8d95e7cb51b414..a85105a2fd5d74ad4d3bda8d71af9a0086729abe 100644
--- a/LayoutTests/http/tests/security/create-document-change-domain.html
+++ b/LayoutTests/http/tests/security/create-document-change-domain.html
@@ -1,30 +1,17 @@
<!DOCTYPE html>
<script src="/js-test-resources/js-test-pre.js"></script>
<script>
-
description('Tests that different documents created using createDocument do not share the underlying domain');
+if (window.internals)
+ internals.settings.setTreatIPAddressAsDomain(true);
var doc = document.implementation.createDocument(null, 'one', null);
-var doc2 = document.implementation.createHTMLDocument('title');
shouldBeEqualToString('document.domain', '127.0.0.1');
shouldBeEqualToString('doc.domain', '127.0.0.1');
-shouldBeEqualToString('doc2.domain', '127.0.0.1');
-
-doc.domain = '0.0.1';
-shouldBeEqualToString('document.domain', '127.0.0.1');
-shouldBeEqualToString('doc.domain', '0.0.1');
-shouldBeEqualToString('doc2.domain', '127.0.0.1');
document.domain = '0.1';
shouldBeEqualToString('document.domain', '0.1');
-shouldBeEqualToString('doc.domain', '0.0.1');
-shouldBeEqualToString('doc2.domain', '127.0.0.1');
-
-doc2.domain = '1';
-shouldBeEqualToString('document.domain', '0.1');
-shouldBeEqualToString('doc.domain', '0.0.1');
-shouldBeEqualToString('doc2.domain', '1');
-
+shouldBeEqualToString('doc.domain', '127.0.0.1');
</script>
<script src="/js-test-resources/js-test-post.js"></script>
</html>

Powered by Google App Engine
This is Rietveld 408576698