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

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

Issue 1988013003: Move generic shorthand serialization checks out of specific routines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shorthand1
Patch Set: actually fix test 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;' ,
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698