| Index: third_party/WebKit/LayoutTests/http/tests/security/document-domain-invalid.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/document-domain-invalid.html b/third_party/WebKit/LayoutTests/http/tests/security/document-domain-invalid.html
|
| index 5bfacbd301e85423b93d0dd0f2a6752370e4207f..91fd118d9d170c89cdcd13c17e922c7e24958a4d 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/document-domain-invalid.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/document-domain-invalid.html
|
| @@ -31,5 +31,22 @@
|
| });
|
| assert_equals(document.domain, '127.0.0.1');
|
| }, 'Setting an invalid `document.domain` that looks like an IP address fails.');
|
| +
|
| + test(function () {
|
| + assert_equals(document.domain, '127.0.0.1');
|
| + assert_throws('SecurityError',
|
| + function () {
|
| + document.domain = '[]';
|
| + });
|
| + assert_throws('SecurityError',
|
| + function () {
|
| + document.domain = 'example.test/path';
|
| + });
|
| + assert_throws('SecurityError',
|
| + function () {
|
| + document.domain = '%.com';
|
| + });
|
| + assert_equals(document.domain, '127.0.0.1');
|
| + }, 'Setting `document.domain` to a host that fails to parse fails.');
|
| </script>
|
| </head>
|
|
|