OLD | NEW |
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> | 4 <script> |
5 | 5 |
6 var tests = [ | 6 var tests = [ |
7 ['border: 1px; border-top: 1px;', 'border: 1px;'], | 7 ['border: 1px; border-top: 1px;', 'border: 1px;'], |
8 ['border: 1px solid red;', 'border: 1px solid red;'], | 8 ['border: 1px solid red;', 'border: 1px solid red;'], |
9 ['border: 1px red;', 'border: 1px red;'], | 9 ['border: 1px red;', 'border: 1px red;'], |
10 ['border: red;', 'border: red;'], | 10 ['border: red;', 'border: red;'], |
11 ['border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px;'
, 'border: 1px;'], | 11 ['border-top: 1px; border-right: 1px; border-bottom: 1px; border-left: 1px;'
, |
| 12 'border-color: initial; border-style: initial; border-width: 1px;'], |
12 ['border-top: 1px; border-right: 2px; border-bottom: 3px; border-left: 4px;'
, 'border-color: initial; border-style: initial; border-width: 1px 2px 3px 4px;'
], | 13 ['border-top: 1px; border-right: 2px; border-bottom: 3px; border-left: 4px;'
, 'border-color: initial; border-style: initial; border-width: 1px 2px 3px 4px;'
], |
13 ['border: 1px; border-top: 2px;', 'border-color: initial; border-style: init
ial; border-width: 2px 1px 1px;'], | 14 ['border: 1px; border-top: 2px;', 'border-color: initial; border-style: init
ial; border-width: 2px 1px 1px; border-image: initial;'], |
14 ['border: 1px; border-top: 1px !important;', | 15 ['border: 1px; border-top: 1px !important;', |
15 'border-right: 1px; border-bottom: 1px; border-left: 1px; border-top: 1px !i
mportant;'], | 16 'border-right: 1px; border-bottom: 1px; border-left: 1px; border-top: 1px !i
mportant; border-image: initial;'], |
16 | 17 |
17 ['border: 1px; border-top-color: red;', 'border-style: initial; border-top-c
olor: red; border-width: 1px;'], | 18 ['border: 1px; border-top-color: red;', |
| 19 'border-bottom-color: initial; border-image: initial; border-left-color: ini
tial; border-right-color: initial; border-style: initial; border-top-color: red;
border-width: 1px;'], |
18 ['border: solid; border-style: dotted', 'border: dotted;'], | 20 ['border: solid; border-style: dotted', 'border: dotted;'], |
19 ['border-width: 1px;', 'border-width: 1px;'], | 21 ['border-width: 1px;', 'border-width: 1px;'], |
20 | 22 |
21 ['-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 2
px;', 'border-spacing: 1px 2px;'], | 23 ['-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 2
px;', 'border-spacing: 1px 2px;'], |
22 | 24 |
23 // We don't use shorthand for font-family, etc... for compatibility reasons | 25 // We don't use shorthand for font-family, etc... for compatibility reasons |
24 ['font-family: sans-serif; line-height: 2em; font-size: 3em; font-style: ita
lic; font-weight: bold;', | 26 ['font-family: sans-serif; line-height: 2em; font-size: 3em; font-style: ita
lic; font-weight: bold;', |
25 'font-family: sans-serif; line-height: 2em; font-size: 3em; font-style:
italic; font-weight: bold;'], | 27 'font-family: sans-serif; line-height: 2em; font-size: 3em; font-style:
italic; font-weight: bold;'], |
26 | 28 |
27 ['list-style-type: circle; list-style-position: inside; list-style-image: in
itial;', 'list-style: circle inside;'], | 29 ['list-style-type: circle; list-style-position: inside; list-style-image: in
itial;', 'list-style: circle inside;'], |
(...skipping 17 matching lines...) Expand all Loading... |
45 test(function() { | 47 test(function() { |
46 | 48 |
47 element = document.createElement('div'); | 49 element = document.createElement('div'); |
48 element.setAttribute('style', styleAttribute); | 50 element.setAttribute('style', styleAttribute); |
49 | 51 |
50 assert_equals(normalizeCssText(element.style.cssText), normalizeCssText(
expectedCssText)); | 52 assert_equals(normalizeCssText(element.style.cssText), normalizeCssText(
expectedCssText)); |
51 }, "cssText set to " + JSON.stringify(styleAttribute) + " is read back as "
+ JSON.stringify(expectedCssText)); | 53 }, "cssText set to " + JSON.stringify(styleAttribute) + " is read back as "
+ JSON.stringify(expectedCssText)); |
52 }); | 54 }); |
53 | 55 |
54 </script> | 56 </script> |
OLD | NEW |