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

Unified Diff: third_party/WebKit/LayoutTests/typedcssom/calcLength.html

Issue 2011833002: Typed CSSOM: Rename CalcLength and StyleCalcLength to CSSCalcLength (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/cssCalcLength.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/typedcssom/calcLength.html
diff --git a/third_party/WebKit/LayoutTests/typedcssom/calcLength.html b/third_party/WebKit/LayoutTests/typedcssom/calcLength.html
deleted file mode 100644
index ab4bb531ee98b16238a191ea2eee59926348c5eb..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/typedcssom/calcLength.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<script src='../resources/testharness.js'></script>
-<script src='../resources/testharnessreport.js'></script>
-
-<script>
-test(function() {
- assert_throws(null, function() { new CalcLength(); });
- assert_throws(null, function() { new CalcLength({}); });
- assert_throws(null, function() { new CalcLength({foo: 1}); });
-}, 'Test that passing invalid arguments to CalcLength throws an exception.');
-
-test(function() {
- var calcLength1 = new CalcLength({px: 1, percent: 2.2});
- var calcLength2 = new CalcLength({px: 3, percent: 4.3});
-
- var result = calcLength1.add(calcLength2);
-
- assert_not_equals(calcLength1, result);
- assert_not_equals(calcLength2, result);
- assert_true(result instanceof CalcLength);
- assert_equals(result.px, 4);
- assert_equals(result.percent, 6.5);
-}, 'Test that adding two CalcLengths produces a new CalcLength with the correct value.');
-
-test(function() {
- var calcLength1 = new CalcLength({px: 1, percent: 2.2});
- var calcLength2 = new CalcLength({px: 3, percent: 4.3});
-
- var result = calcLength1.subtract(calcLength2);
-
- assert_not_equals(calcLength1, result);
- assert_not_equals(calcLength2, result);
- assert_true(result instanceof CalcLength);
- assert_equals(result.px, -2);
- assert_approx_equals(result.percent, -2.1, 0.000001);
-}, 'Test that subtracting two CalcLengths produces a new CalcLength with the correct values.');
-
-test(function() {
- var calcLength = new CalcLength({px: 1, percent: 5.2});
- var result = calcLength.multiply(3);
-
- assert_not_equals(calcLength, result);
- assert_equals(result.px, 3);
- assert_approx_equals(result.percent, 15.6, 0.000001);
-}, 'Test that multiplying a CalcLength produces a new CalcLength with the correct values.');
-
-test(function() {
- var calcLength = new CalcLength({px: 3, percent: 15.6});
- var result = calcLength.divide(3);
-
- assert_not_equals(calcLength, result);
- assert_equals(result.px, 1);
- assert_equals(result.percent, 5.2);
-}, 'Test that dividing a CalcLength produces a new CalcLength with the correct values.');
-
-test(function() {
- var values = [
- {input: new CalcLength({px: 1}), cssString: 'calc(1px)'},
- {input: new CalcLength({px: -1}), cssString: 'calc(-1px)'},
- {input: new CalcLength({px: 1, percent: 15.6}), cssString: 'calc(15.6% + 1px)'},
- {input: new CalcLength({px: 1, percent: -15.6}), cssString: 'calc(-15.6% + 1px)'},
- {input: new CalcLength({px: -1, percent: -15.6}), cssString: 'calc(-15.6% - 1px)'},
- {input: new CalcLength({px: -1, percent: -15.6, vw: 5}), cssString: 'calc((-15.6% - 1px) + 5vw)'},
- {input: new CalcLength({px: -1, percent: -15.6, vw: -5}), cssString: 'calc((-15.6% - 1px) - 5vw)'},
- ];
-
- for (var i = 0; i < values.length; ++i) {
- assert_equals(values[i].input.cssString, values[i].cssString);
- }
-
-}, 'Test that the CSS string method for a CalcLength produces the correct result');
-
-</script>
-
-<body>
-</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/typedcssom/cssCalcLength.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698