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

Side by Side Diff: LayoutTests/css-parser/scientific-notation.html

Issue 1120133004: Serialize <number> to round to at most 6 decimals (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to fix win Created 5 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 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 <script src="resources/property-parsing-test.js"></script> 4 <script src="resources/property-parsing-test.js"></script>
5 <script> 5 <script>
6 assert_valid_value("opacity", "2e2", "200"); 6 assert_valid_value("opacity", "2e2", "200");
7 assert_valid_value("opacity", "2E2", "200"); 7 assert_valid_value("opacity", "2E2", "200");
8 assert_valid_value("opacity", "2e+2", "200"); 8 assert_valid_value("opacity", "2e+2", "200");
9 assert_valid_value("opacity", "2E+2", "200"); 9 assert_valid_value("opacity", "2E+2", "200");
10 assert_valid_value("opacity", "2e-2", "0.02"); 10 assert_valid_value("opacity", "2e-2", "0.02");
11 assert_valid_value("opacity", "2E-2", "0.02"); 11 assert_valid_value("opacity", "2E-2", "0.02");
12 assert_valid_value("opacity", "2e200", "2e+200"); 12 assert_valid_value("opacity", "2e200", "2e+200");
13 assert_valid_value("opacity", "2E200", "2e+200"); 13 assert_valid_value("opacity", "2E200", "2e+200");
14 assert_valid_value("opacity", "2e+200", "2e+200"); 14 assert_valid_value("opacity", "2e+200", "2e+200");
15 assert_valid_value("opacity", "2E+200", "2e+200"); 15 assert_valid_value("opacity", "2E+200", "2e+200");
16 assert_valid_value("opacity", "2e-200", "2e-200"); 16 assert_valid_value("opacity", "2e-200", "2e-200");
17 assert_valid_value("opacity", "2E-200", "2e-200"); 17 assert_valid_value("opacity", "2E-200", "2e-200");
18 assert_valid_value("opacity", "1e0", "1"); 18 assert_valid_value("opacity", "1e0", "1");
19 assert_valid_value("opacity", "1e+0", "1"); 19 assert_valid_value("opacity", "1e+0", "1");
20 assert_valid_value("opacity", "1e-0", "1"); 20 assert_valid_value("opacity", "1e-0", "1");
21 assert_valid_value("opacity", "1e10", "10000000000"); 21 assert_valid_value("opacity", "1e10", "1e+10");
22 assert_valid_value("opacity", "1e+10", "10000000000"); 22 assert_valid_value("opacity", "1e+10", "1e+10");
23 assert_valid_value("opacity", "1e-10", "1e-10"); 23 assert_valid_value("opacity", "1e-10", "1e-10");
24 assert_valid_value("width", "2e2px", "200px"); 24 assert_valid_value("width", "2e2px", "200px");
25 assert_valid_value("width", "2E2px", "200px"); 25 assert_valid_value("width", "2E2px", "200px");
26 assert_valid_value("width", "2e+2px", "200px"); 26 assert_valid_value("width", "2e+2px", "200px");
27 assert_valid_value("width", "2E+2px", "200px"); 27 assert_valid_value("width", "2E+2px", "200px");
28 assert_valid_value("width", "2e-2px", "0.02px"); 28 assert_valid_value("width", "2e-2px", "0.02px");
29 assert_valid_value("width", "2E-2px", "0.02px"); 29 assert_valid_value("width", "2E-2px", "0.02px");
30 assert_valid_value("width", "2e200px", "2e+200px"); 30 assert_valid_value("width", "2e200px", "2e+200px");
31 assert_valid_value("width", "2E200px", "2e+200px"); 31 assert_valid_value("width", "2E200px", "2e+200px");
32 assert_valid_value("width", "2e+200px", "2e+200px"); 32 assert_valid_value("width", "2e+200px", "2e+200px");
33 assert_valid_value("width", "2E+200px", "2e+200px"); 33 assert_valid_value("width", "2E+200px", "2e+200px");
34 assert_valid_value("width", "2e-200px", "2e-200px"); 34 assert_valid_value("width", "2e-200px", "2e-200px");
35 assert_valid_value("width", "2E-200px", "2e-200px"); 35 assert_valid_value("width", "2E-200px", "2e-200px");
36 assert_valid_value("width", "1e0px", "1px"); 36 assert_valid_value("width", "1e0px", "1px");
37 assert_valid_value("width", "1e+0px", "1px"); 37 assert_valid_value("width", "1e+0px", "1px");
38 assert_valid_value("width", "1e-0px", "1px"); 38 assert_valid_value("width", "1e-0px", "1px");
39 assert_valid_value("width", "1e10px", "10000000000px"); 39 assert_valid_value("width", "1e10px", "1e+10px");
40 assert_valid_value("width", "1e+10px", "10000000000px"); 40 assert_valid_value("width", "1e+10px", "1e+10px");
41 assert_valid_value("width", "1e-10px", "1e-10px"); 41 assert_valid_value("width", "1e-10px", "1e-10px");
42 assert_valid_value("width", "1e0em", "1em"); 42 assert_valid_value("width", "1e0em", "1em");
43 assert_valid_value("width", "1e+0em", "1em"); 43 assert_valid_value("width", "1e+0em", "1em");
44 assert_valid_value("width", "1e-0em", "1em"); 44 assert_valid_value("width", "1e-0em", "1em");
45 assert_valid_value("width", "1e10em", "10000000000em"); 45 assert_valid_value("width", "1e10em", "1e+10em");
46 assert_valid_value("width", "1e+10em", "10000000000em"); 46 assert_valid_value("width", "1e+10em", "1e+10em");
47 assert_valid_value("width", "1e-10em", "1e-10em"); 47 assert_valid_value("width", "1e-10em", "1e-10em");
48 assert_valid_value("width", "1e0%", "1%"); 48 assert_valid_value("width", "1e0%", "1%");
49 assert_valid_value("width", "1e+0%", "1%"); 49 assert_valid_value("width", "1e+0%", "1%");
50 assert_valid_value("width", "1e-0%", "1%"); 50 assert_valid_value("width", "1e-0%", "1%");
51 assert_valid_value("width", "1e10%", "10000000000%"); 51 assert_valid_value("width", "1e10%", "1e+10%");
52 assert_valid_value("width", "1e+10%", "10000000000%"); 52 assert_valid_value("width", "1e+10%", "1e+10%");
53 assert_valid_value("width", "1e-10%", "1e-10%"); 53 assert_valid_value("width", "1e-10%", "1e-10%");
54 // Large exponents (not representable). This is not necessarily the correct valu e. 54 // Large exponents (not representable). This is not necessarily the correct valu e.
55 assert_valid_value("opacity", "1e-600", "0"); 55 assert_valid_value("opacity", "1e-600", "0");
56 assert_valid_value("width", "1e600px", "0px"); 56 assert_valid_value("width", "1e600px", "0px");
57 assert_valid_value("width", "1e-600px", "0px"); 57 assert_valid_value("width", "1e-600px", "0px");
58 58
59 assert_invalid_value("width", "1e+px"); 59 assert_invalid_value("width", "1e+px");
60 assert_invalid_value("width", "1e-px"); 60 assert_invalid_value("width", "1e-px");
61 assert_invalid_value("width", "1e1.0px"); 61 assert_invalid_value("width", "1e1.0px");
62 assert_invalid_value("width", "1e10.0px"); 62 assert_invalid_value("width", "1e10.0px");
63 assert_invalid_value("width", "1e1.0em"); 63 assert_invalid_value("width", "1e1.0em");
64 assert_invalid_value("width", "1e10.0em"); 64 assert_invalid_value("width", "1e10.0em");
65 assert_invalid_value("opacity", "1e600"); 65 assert_invalid_value("opacity", "1e600");
66 </script> 66 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698