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'); |