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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Invalid `document.domain` doesn't crash.</title> 4 <title>Setting `document.domain` to invalid values fails.</title>
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <script> 7 <script>
8 test(function () { 8 test(function () {
9 assert_equals(document.domain, '127.0.0.1'); 9 assert_equals(document.domain, '127.0.0.1');
10 assert_throws('SecurityError', 10 assert_throws('SecurityError',
11 function () { 11 function () {
12 document.domain = null;
13 });
14 assert_equals(document.domain, '127.0.0.1');
15 }, 'Setting `document.domain` to null fails.');
16
17 test(function () {
18 assert_equals(document.domain, '127.0.0.1');
19 assert_throws('SecurityError',
20 function () {
21 document.domain = '';
22 });
23 assert_equals(document.domain, '127.0.0.1');
24 }, 'Setting `document.domain` to the empty string fails.');
25
26 test(function () {
27 assert_equals(document.domain, '127.0.0.1');
28 assert_throws('SecurityError',
29 function () {
12 document.domain = '0.0000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000001.1'; 30 document.domain = '0.0000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000001.1';
13 }); 31 });
14 assert_equals(document.domain, '127.0.0.1'); 32 assert_equals(document.domain, '127.0.0.1');
15 }, 'Setting an invalid `document.domain` that looks like an IP address f ails.'); 33 }, 'Setting an invalid `document.domain` that looks like an IP address f ails.');
16 </script> 34 </script>
17 </head> 35 </head>
OLDNEW
« 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