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

Side by Side Diff: third_party/WebKit/LayoutTests/typedcssom/inlinestyle/transform-perspective.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 <div id="testElement"></div> 4 <div id="testElement"></div>
5 <script> 5 <script>
6 var EPSILON = 1e-6; // float epsilon 6 var EPSILON = 1e-6; // float epsilon
7 var supportedUnits = [ 7 var supportedUnits = [
8 'px', 8 'px',
9 'em', 9 'em',
10 'ex', 10 'ex',
(...skipping 25 matching lines...) Expand all
36 assert_equals(components.length, 1); 36 assert_equals(components.length, 1);
37 assert_equals(components[0].constructor.name, CSSPerspective.name); 37 assert_equals(components[0].constructor.name, CSSPerspective.name);
38 assert_equals(components[0].toString(), cssText); 38 assert_equals(components[0].toString(), cssText);
39 } 39 }
40 }, "Perspective read from a StyleMap is correct"); 40 }, "Perspective read from a StyleMap is correct");
41 41
42 test(function() { 42 test(function() {
43 for (var i = 0; i < supportedUnits.length; i++) { 43 for (var i = 0; i < supportedUnits.length; i++) {
44 var unit = supportedUnits[i]; 44 var unit = supportedUnits[i];
45 var perspective = new CSSTransformValue([ 45 var perspective = new CSSTransformValue([
46 new CSSPerspective(new CSSSimpleLength(i, unit))]); 46 new CSSPerspective(new CSSUnitValue(i, unit))]);
47 testElement.styleMap.set('transform', perspective); 47 testElement.styleMap.set('transform', perspective);
48 48
49 var cssText = 'perspective(' + i + unit + ')'; 49 var cssText = 'perspective(' + i + unit + ')';
50 assert_equals(testElement.style.transform, cssText); 50 assert_equals(testElement.style.transform, cssText);
51 } 51 }
52 }, "Set Perspective into the inline StylePropertyMap"); 52 }, "Set Perspective into the inline StylePropertyMap");
53 53
54 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698