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

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

Issue 1162933003: Remove [TreatNullAs=NullString] from Document.domain (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/document-domain-invalid.html
diff --git a/LayoutTests/http/tests/security/document-domain-invalid.html b/LayoutTests/http/tests/security/document-domain-invalid.html
index 6a1195da6c339aee0609cee0a5bb61181dc34501..5bfacbd301e85423b93d0dd0f2a6752370e4207f 100644
--- a/LayoutTests/http/tests/security/document-domain-invalid.html
+++ b/LayoutTests/http/tests/security/document-domain-invalid.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Invalid `document.domain` doesn't crash.</title>
+ <title>Setting `document.domain` to invalid values fails.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
@@ -9,6 +9,24 @@
assert_equals(document.domain, '127.0.0.1');
assert_throws('SecurityError',
function () {
+ document.domain = null;
+ });
+ assert_equals(document.domain, '127.0.0.1');
+ }, 'Setting `document.domain` to null fails.');
+
+ test(function () {
+ assert_equals(document.domain, '127.0.0.1');
+ assert_throws('SecurityError',
+ function () {
+ document.domain = '';
+ });
+ assert_equals(document.domain, '127.0.0.1');
+ }, 'Setting `document.domain` to the empty string fails.');
+
+ test(function () {
+ assert_equals(document.domain, '127.0.0.1');
+ assert_throws('SecurityError',
+ function () {
document.domain = '0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.1';
});
assert_equals(document.domain, '127.0.0.1');
« no previous file with comments | « no previous file | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698