Index: third_party/WebKit/LayoutTests/css3/calc/calc-overflow.html |
diff --git a/third_party/WebKit/LayoutTests/css3/calc/calc-overflow.html b/third_party/WebKit/LayoutTests/css3/calc/calc-overflow.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a0eebb87fa5a4280539d1eb1ac7d4aac4670c7e7 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/css3/calc/calc-overflow.html |
@@ -0,0 +1,18 @@ |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<body></body> |
+<script> |
+function undefinedBehaviourTest(input, expected, type) { |
+ test(() => { |
+ var target = document.createElement('div'); |
+ document.body.appendChild(target); |
+ target.style.lineHeight = input; |
+ assert_equals(getComputedStyle(target).lineHeight, expected); |
+ target.remove(); |
+ }, 'Do not invoke undefined behaviour when using calc()s with large ' + type + ' values'); |
+} |
+ |
+undefinedBehaviourTest('calc(1e400px * 1e400)', '3.35544e+07px', 'pixel'); |
+undefinedBehaviourTest('calc(1e400% * 1e400)', '3.43597e+08px', 'percentage'); |
+undefinedBehaviourTest('calc(1e400 * 1e400)', '3.40282e+38px', 'number'); |
+</script> |