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

Side by Side Diff: LayoutTests/fast/dom/script-tests/unsigned-long-attribute-reflection.js

Issue 99443005: Enforce HTML range restriction on setting unsigned attribute values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // http://whatwg.org/html#reflecting-content-attributes-in-idl-attributes 1 // http://whatwg.org/html#reflecting-content-attributes-in-idl-attributes
2 // http://whatwg.org/html#rules-for-parsing-non-negative-integers 2 // http://whatwg.org/html#rules-for-parsing-non-negative-integers
3 function testUnsignedLong(interface, createElement, attribute) 3 function testUnsignedLong(interface, createElement, attribute)
4 { 4 {
5 test(function() 5 test(function()
6 { 6 {
7 var element = createElement(); 7 var element = createElement();
8 8
9 assert_equals(element[attribute], 0); 9 assert_equals(element[attribute], 0);
10 10
(...skipping 21 matching lines...) Expand all
32 assert_false(element.hasAttribute(attribute)); 32 assert_false(element.hasAttribute(attribute));
33 33
34 function t(input, output) 34 function t(input, output)
35 { 35 {
36 element[attribute] = input; 36 element[attribute] = input;
37 assert_equals(element.getAttribute(attribute), output); 37 assert_equals(element.getAttribute(attribute), output);
38 } 38 }
39 39
40 t(0, "0"); 40 t(0, "0");
41 t(2147483647, "2147483647"); 41 t(2147483647, "2147483647");
42 // per spec: 42 t(2147483648, "0");
43 //t(2147483648, "0"); 43 t(2147483700, "0");
44 //t(-1, "0"); 44 t(-1, "0");
45 // per implementation <http://crbug.com/316122>: 45 t(-3, "0");
46 t(2147483648, "2147483648");
47 t(-1, "4294967295");
48 }, "set " + interface + "." + attribute); 46 }, "set " + interface + "." + attribute);
49 } 47 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698