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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/inlineStylePropertyMap_append.html

Issue 2867883003: [CSS Typed OM] Delete obsolete number and length classes from Typed OM (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 4
5 <div id="testElement"></div> 5 <div id="testElement"></div>
6 6
7 <script> 7 <script>
8 8
9 // Append 9 // Append
10 test(function() { 10 test(function() {
11 assert_throws(new TypeError(), function() { 11 assert_throws(new TypeError(), function() {
12 testElement.styleMap.append('width', new CSSSimpleLength(60, 'px')); 12 testElement.styleMap.append('width', new CSSUnitValue(60, 'px'));
13 }); 13 });
14 }, "Attempting to append to a property that doesn't support multiple values thro ws"); 14 }, "Attempting to append to a property that doesn't support multiple values thro ws");
15 15
16 test(function() { 16 test(function() {
17 // TODO(meade): Use a property that supports multiple values when that is avai lable. 17 // TODO(meade): Use a property that supports multiple values when that is avai lable.
18 assert_throws(new TypeError(), function() { 18 assert_throws(new TypeError(), function() {
19 testElement.styleMap.append('width', new CSSNumberValue(70)); 19 testElement.styleMap.append('width', new CSSUnitValue(70, 'number'));
20 }); 20 });
21 }, "Appending an invalid type to a property throws"); 21 }, "Appending an invalid type to a property throws");
22 22
23 test(function() { 23 test(function() {
24 assert_throws(new TypeError(), function() { 24 assert_throws(new TypeError(), function() {
25 testElement.styleMap.append('lemons', new CSSNumberValue(6)); 25 testElement.styleMap.append('lemons', new CSSUnitValue(6, 'number'));
26 }); 26 });
27 }, "Attempting to append to an invalid property throws"); 27 }, "Attempting to append to an invalid property throws");
28 28
29 </script> 29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698