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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/cssLengthValue.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
(Empty)
1 <!DOCTYPE html>
2 <script src='../resources/testharness.js'></script>
3 <script src='../resources/testharnessreport.js'></script>
4 <script>
5
6 test(function() {
7 var result = CSSLengthValue.from(5, 'px');
8 assert_equals(result.constructor.name, CSSSimpleLength.name);
9 assert_equals(result.value, 5);
10 assert_equals(result.type, 'px');
11 }, "Test that CSSLengthValue's static from(double value, LengthType type) method produces a CSSSimpleLength.");
12
13 test(function() {
14 var result = CSSLengthValue.from({px: 1, percent: 2.5});
15 assert_equals(result.constructor.name, CSSCalcLength.name);
16 assert_equals(result.px, 1);
17 assert_equals(result.percent, 2.5);
18 }, "Test that CSSLengthValue's static from(CalcDictionary dictionary) method pro duces a CSSCalcLength.");
19
20 </script>
21 <body>
22 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698