Index: third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value.html |
diff --git a/third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value.html b/third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..40688be7d578dfa478e496e0bdb80df505d0b3b9 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/css-parser/serialize-css-alpha-value.html |
@@ -0,0 +1,16 @@ |
+<!DOCTYPE html> |
+<title>Harness Test: Floating point alpha values of numbers to two decimial places are serialized and returned correctly.</title> |
sashab
2017/01/05 04:10:34
Typo: decimal
ktyliu
2017/01/06 01:58:30
Done.
|
+<body> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script> |
+test(function() { |
+ for (var i = 0.0; i <= 1.0; i += 0.01) { |
sashab
2017/01/05 04:10:34
Maybe make it clearer that this used to fail for c
ktyliu
2017/01/06 01:58:30
actually almost all values would fail previously,
|
+ var rgba = 'rgba(0, 0, 0, ' + parseFloat(i.toFixed(2)) + ')'; |
+ document.body.style.color = rgba; |
+ assert_equals(document.body.style.color, rgba); |
+ assert_equals(getComputedStyle(document.body).color, rgba); |
+ } |
+}); |
sashab
2017/01/05 04:10:34
Please add a title for this test - you can remove
sashab
2017/01/05 04:10:34
Please add a title for this test - you can remove
ktyliu
2017/01/06 01:58:30
Acknowledged.
ktyliu
2017/01/06 01:58:30
I thought we should use <title> for a single test
alancutter (OOO until 2018)
2017/01/06 02:47:00
Calls to test() should come with a description par
|
+</script> |
+ |