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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html

Issue 1984163002: Fix up CSSStyleDeclaration::cssText serialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@border
Patch Set: 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 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> 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;' , 'border: 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;' ], 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: 1px; border-top: 2px;', 'border-color: initial; border-style: init ial; border-width: 2px 1px 1px;'], 13 ['border: 1px; border-top: 2px;', 'border-color: initial; border-style: init ial; border-width: 2px 1px 1px;'],
14 ['border: 1px; border-top: 1px !important;', 14 ['border: 1px; border-top: 1px !important;',
15 'border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-width: 1px !important;'], 15 'border-right: 1px; border-bottom: 1px; border-left: 1px; border-top: 1px !i mportant;'],
16 16
17 ['border: 1px; border-top-color: red;', 'border-style: initial; border-top-c olor: red; border-width: 1px;'], 17 ['border: 1px; border-top-color: red;', 'border-style: initial; border-top-c olor: red; border-width: 1px;'],
18 ['border: solid; border-style: dotted', 'border: dotted;'], 18 ['border: solid; border-style: dotted', 'border: dotted;'],
19 ['border-width: 1px;', 'border-width: 1px;'], 19 ['border-width: 1px;', 'border-width: 1px;'],
20 20
21 ['-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 2 px;', 'border-spacing: 1px 2px;'], 21 ['-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 2 px;', 'border-spacing: 1px 2px;'],
22 22
23 // We don't use shorthand for font-family, etc... for compatibility reasons 23 // 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;', 24 ['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;'], 25 'font-family: sans-serif; line-height: 2em; font-size: 3em; font-style: italic; font-weight: bold;'],
(...skipping 19 matching lines...) Expand all
45 test(function() { 45 test(function() {
46 46
47 element = document.createElement('div'); 47 element = document.createElement('div');
48 element.setAttribute('style', styleAttribute); 48 element.setAttribute('style', styleAttribute);
49 49
50 assert_equals(normalizeCssText(element.style.cssText), normalizeCssText( expectedCssText)); 50 assert_equals(normalizeCssText(element.style.cssText), normalizeCssText( expectedCssText));
51 }, "cssText set to " + JSON.stringify(styleAttribute) + " is read back as " + JSON.stringify(expectedCssText)); 51 }, "cssText set to " + JSON.stringify(styleAttribute) + " is read back as " + JSON.stringify(expectedCssText));
52 }); 52 });
53 53
54 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698