Changeset 64186 in webkit
- Timestamp:
- Jul 27, 2010 8:44:53 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 8 added
- 25 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64179 r64186 1 2010-07-27 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Darin Adler. 4 5 Convert DRT list tests from pixel-tests/render tree dumps to text 6 https://bugs.webkit.org/show_bug.cgi?id=42803 7 8 With the passing of Bug #37929 and Bug #37930, convert a subset of the 9 DRT tests for lists from pixel-tests to text-based tests now that we 10 can retrieve the list item marker text in both the Mac and Windows ports. 11 12 * fast/lists/alpha-boundary-values-expected.txt: Added. 13 * fast/lists/alpha-boundary-values.html: Modified to dump as text. 14 * fast/lists/alpha-list-wrap-expected.txt: Added. 15 * fast/lists/alpha-list-wrap.html: Modified to dump as text. 16 * fast/lists/decimal-leading-zero-expected.txt: Added. 17 * fast/lists/decimal-leading-zero.html: Modified to dump as text. 18 * fast/lists/li-values-expected.txt: Added. 19 * fast/lists/li-values.html: Modified to dump as text. 20 * fast/lists/list-style-type-dynamic-change-expected.txt: Added. 21 * fast/lists/list-style-type-dynamic-change.html: Modified to dump as text. 22 * fast/lists/resources/dump-list.js: 23 (dumpList): Modified to call processList. 24 (filterListsWithReplacement): Added. 25 (processList): Added. 26 (dumpListItemAsHTML): Added. 27 (printPassedIfEmptyString): Added. 28 (printFailedIfListItemMarkerNotEqualListItemText): Added. 29 * fast/lists/w3-css3-list-styles-alphabetic-expected.txt: Added. 30 * fast/lists/w3-css3-list-styles-alphabetic.html: Modified to dump as text. 31 * fast/lists/w3-css3-list-styles-numeric-expected.txt: Added. 32 * fast/lists/w3-css3-list-styles-numeric.html: Modified to dump as text. 33 Also, fix typos in the binary list-style-type results. 34 * fast/lists/w3-list-styles-expected.txt: Added. 35 * fast/lists/w3-list-styles.html: Modified to dump as text. 36 * platform/mac/fast/lists/alpha-boundary-values-expected.checksum: Removed. 37 * platform/mac/fast/lists/alpha-boundary-values-expected.png: Removed. 38 * platform/mac/fast/lists/alpha-boundary-values-expected.txt: Removed. 39 * platform/mac/fast/lists/alpha-list-wrap-expected.checksum: Removed. 40 * platform/mac/fast/lists/alpha-list-wrap-expected.png: Removed. 41 * platform/mac/fast/lists/alpha-list-wrap-expected.txt: Removed. 42 * platform/mac/fast/lists/decimal-leading-zero-expected.checksum: Removed. 43 * platform/mac/fast/lists/decimal-leading-zero-expected.png: Removed. 44 * platform/mac/fast/lists/decimal-leading-zero-expected.txt: Removed. 45 * platform/mac/fast/lists/li-values-expected.checksum: Removed. 46 * platform/mac/fast/lists/li-values-expected.png: Removed. 47 * platform/mac/fast/lists/li-values-expected.txt: Removed. 48 * platform/mac/fast/lists/list-style-type-dynamic-change-expected.checksum: Removed. 49 * platform/mac/fast/lists/list-style-type-dynamic-change-expected.png: Removed. 50 * platform/mac/fast/lists/list-style-type-dynamic-change-expected.txt: Removed. 51 * platform/mac/fast/lists/w3-css3-list-styles-alphabetic-expected.checksum: Removed. 52 * platform/mac/fast/lists/w3-css3-list-styles-alphabetic-expected.png: Removed. 53 * platform/mac/fast/lists/w3-css3-list-styles-alphabetic-expected.txt: Removed. 54 * platform/mac/fast/lists/w3-css3-list-styles-numeric-expected.checksum: Removed. 55 * platform/mac/fast/lists/w3-css3-list-styles-numeric-expected.png: Removed. 56 * platform/mac/fast/lists/w3-css3-list-styles-numeric-expected.txt: Removed. 57 * platform/mac/fast/lists/w3-list-styles-expected.checksum: Removed. 58 * platform/mac/fast/lists/w3-list-styles-expected.png: Removed. 59 * platform/mac/fast/lists/w3-list-styles-expected.txt: Removed. 60 * platform/win/fast/lists: Removed. 61 * platform/win/fast/lists/w3-css3-list-styles-alphabetic-expected.txt: Removed. 62 * platform/win/fast/lists/w3-css3-list-styles-numeric-expected.txt: Removed. 63 1 64 2010-07-27 Andrew Scherkus <scherkus@chromium.org> 2 65 -
trunk/LayoutTests/fast/lists/alpha-boundary-values.html
r59950 r64186 17 17 <li value=18280 type=A> 18 18 <li value=18281 type=A> 19 </ol> 20 <script src="resources/dump-list.js"></script> 21 <script> 22 if (window.layoutTestController) { 23 layoutTestController.dumpAsText(); 24 filterListsWithReplacement(document.querySelectorAll("ol")); 25 } 26 </script> -
trunk/LayoutTests/fast/lists/alpha-list-wrap.html
r14023 r64186 8 8 } 9 9 </script> 10 <script src="resources/dump-list.js"></script> 11 <script> 12 if (window.layoutTestController) { 13 layoutTestController.dumpAsText(); 14 filterListsWithReplacement([document.getElementById("test")]); 15 } 16 </script> -
trunk/LayoutTests/fast/lists/decimal-leading-zero.html
r18637 r64186 23 23 <li value="100">this list item should be labeled 100</li> 24 24 </ol> 25 <script src="resources/dump-list.js"></script> 26 <script> 27 if (window.layoutTestController) { 28 layoutTestController.dumpAsText(); 29 filterListsWithReplacement(document.querySelectorAll("ol")); 30 } 31 </script> -
trunk/LayoutTests/fast/lists/li-values.html
r18637 r64186 1 <script src="resources/dump-list.js"></script> 1 2 <script> 2 3 … … 4 5 { 5 6 document.getElementById("removeMyValue").removeAttribute("value"); 7 filterListsWithReplacement(document.querySelectorAll("ol")); 6 8 if (window.layoutTestController) 7 9 layoutTestController.notifyDone(); … … 10 12 function init() 11 13 { 12 if (window.layoutTestController) 14 if (window.layoutTestController) { 15 layoutTestController.dumpAsText(); 13 16 layoutTestController.waitUntilDone(); 17 } 14 18 setTimeout(finishTest, 0); 15 19 } -
trunk/LayoutTests/fast/lists/list-style-type-dynamic-change.html
r19875 r64186 20 20 document.getElementById("list").style.listStyleType = "decimal"; 21 21 </script> 22 <script src="resources/dump-list.js"></script> 23 <script> 24 if (window.layoutTestController) { 25 layoutTestController.dumpAsText(); 26 filterListsWithReplacement([document.getElementById("list")]); 27 } 28 </script> 22 29 </body> 23 30 </html> -
trunk/LayoutTests/fast/lists/resources/dump-list.js
r63034 r64186 7 7 } 8 8 9 function dumpList Helper(element, depth)9 function dumpList(list) 10 10 { 11 var list = new String(); 12 13 for (var child = element.firstElementChild; child; child = child.nextElementSibling) { 14 var marker = layoutTestController.markerTextForListItem(child); 15 if (marker) 16 list += indent(depth) + ' ' + marker + ' ' + child.innerText.trim() + '<br>'; 17 list += dumpListHelper(child, depth + 1); 18 } 19 20 return list; 11 return processList(list, dumpListItemAsHTML, 0); 21 12 } 22 13 23 function dumpList(list)14 function filterListsWithReplacement(lists, processListItemFunction, postFilterFunction) 24 15 { 25 return dumpListHelper(list, 0); 16 processListItemFunction = processListItemFunction || dumpListItemAsHTML; 17 for (var i = 0; i < lists.length; ++i) { 18 var parentNode = lists[i].parentNode; 19 var replacementNode = document.createElement("div"); 20 var result = processList(lists[i], processListItemFunction, 0); 21 replacementNode.innerHTML = postFilterFunction ? postFilterFunction(result) : result; 22 parentNode.replaceChild(replacementNode, lists[i]); 23 } 26 24 } 25 26 function processList(element, processListItemFunction, depth) 27 { 28 var result = ""; 29 for (var child = element.firstElementChild; child; child = child.nextElementSibling) { 30 result += processListItemFunction(child, depth); 31 result += processList(child, processListItemFunction, depth + 1); 32 } 33 return result; 34 } 35 36 function dumpListItemAsHTML(listItemElement, depth) 37 { 38 var marker = layoutTestController.markerTextForListItem(listItemElement); 39 return marker ? indent(depth) + ' ' + marker + ' ' + listItemElement.innerText.trim() + '<br/>' : ''; 40 } 41 42 function printPassedIfEmptyString(string) 43 { 44 return string ? string : '<span class="pass">PASS</span><br/>'; 45 } 46 47 function printFailedIfListItemMarkerNotEqualListItemText(listItemElement, depth) 48 { 49 var marker = layoutTestController.markerTextForListItem(listItemElement); 50 var expectedMarkerText = listItemElement.innerText.trim(); 51 if (marker === expectedMarkerText) 52 return ''; 53 return '<span><span class="fail">FAIL</span> list marker should be ' + expectedMarkerText + '. Was ' + marker + '.</span><br/>'; 54 } -
trunk/LayoutTests/fast/lists/w3-css3-list-styles-alphabetic.html
r60899 r64186 80 80 ol.upper-norwegian { list-style-type: upper-norwegian; } 81 81 </style> 82 <script src="resources/dump-list.js"></script> 83 <script> 84 function runTest() 85 { 86 if (!window.layoutTestController) 87 return; 88 89 layoutTestController.dumpAsText(); 90 filterListsWithReplacement(document.querySelectorAll(".test ol"), printFailedIfListItemMarkerNotEqualListItemText, printPassedIfEmptyString); 91 document.body.removeChild(document.getElementById("description")); // Remove description when running in DRT. 92 } 93 window.onload = runTest; 94 </script> 82 95 </head> 83 96 <body> 84 97 <h1>CSS3 Alphabetic list-style-types</h1> 98 <div id="description"> 85 99 <p>This tests that all of the alphabetic CSS3 list-style-types are supported as per <a href="http://www.w3.org/TR/css3-lists/#alphabetic">section 4.4 of the spec. CSS3 Lists module</a> (Draft 7 November 2002). This test PASSED if the list item matches its bullet for every list item (below). For example, for the upper-greek alphabet the third <li> (which corresponds to Gamma in the lexicographic ordering of the upper greek alphabet) should be rendered as: Γ. Γ.</p> 86 100 <p>Note, some list-style-types may use a suffix other than a dot ('.').</p> 101 </div> 87 102 <div class="test"> 88 103 <h2>afar</h2> -
trunk/LayoutTests/fast/lists/w3-css3-list-styles-numeric.html
r54472 r64186 59 59 ol.upper-hexadecimal { list-style-type: upper-hexadecimal; } 60 60 </style> 61 <script src="resources/dump-list.js"></script> 62 <script> 63 function printFailedIfListItemMarkerNotEqualListItemText(listItemElement, depth) 64 { 65 var marker = layoutTestController.markerTextForListItem(listItemElement); 66 var isNegativeNumber = listItemElement.parentNode.className && listItemElement.parentNode.className.split(" ").indexOf("negative-number") > -1; 67 var expectedMarkerText = isNegativeNumber ? "-" : ""; 68 expectedMarkerText += listItemElement.innerText; 69 if (marker === expectedMarkerText) 70 return ''; 71 return '<span><span class="fail">FAIL</span> list marker should be ' + expectedMarkerText + '. Was ' + marker + '.</span><br/>'; 72 } 73 74 function runTest() 75 { 76 if (!window.layoutTestController) 77 return; 78 79 layoutTestController.dumpAsText(); 80 filterListsWithReplacement(document.querySelectorAll(".test ol"), printFailedIfListItemMarkerNotEqualListItemText, printPassedIfEmptyString); 81 document.body.removeChild(document.getElementById("description")); // Remove description when running in DRT. 82 } 83 window.onload = runTest; 84 </script> 61 85 </head> 62 86 <body> 63 87 <h1>CSS3 Numeric list-style-type</h1> 64 <p >This tests that all of the numeric CSS3 list-style-types are supported as per <a href="http://www.w3.org/TR/css3-lists/#numeric">section 4.3 of the spec. CSS3 Lists module</a> (Draft 7 November 2002). This test PASSED if the list item matches its bullet for every list item (below). For example, for the decimal numeric system the second <li> (which corresponds to 2 in the standard ordering of the positive integers) should be rendered as: 2. 2</p>88 <p id="description">This tests that all of the numeric CSS3 list-style-types are supported as per <a href="http://www.w3.org/TR/css3-lists/#numeric">section 4.3 of the spec. CSS3 Lists module</a> (Draft 7 November 2002). This test PASSED if the list item matches its bullet for every list item (below). For example, for the decimal numeric system the second <li> (which corresponds to 2 in the standard ordering of the positive integers) should be rendered as: 2. 2</p> 65 89 <div class="test"> 66 90 <h2>arabic-indic</h2> … … 96 120 </ol> 97 121 <ol class="binary negative-number" start="-2147483648"> 98 <li>1000000000000000000000000000000 </li>99 <li>111111111111111111111111111111 </li>122 <li>10000000000000000000000000000000</li> 123 <li>1111111111111111111111111111111</li> 100 124 </ol> 101 125 </div> -
trunk/LayoutTests/fast/lists/w3-list-styles.html
r18679 r64186 20 20 ol ol { margin-bottom: 0em; margin-top: 0.5em; } 21 21 </style> 22 <script src="resources/dump-list.js"></script> 23 <script> 24 window.onload = function() 25 { 26 if (window.layoutTestController) { 27 layoutTestController.dumpAsText(); 28 filterListsWithReplacement(document.querySelectorAll(".test ol")); 29 } 30 } 31 </script> 22 32 </head> 23 33 <body>
Note: See TracChangeset
for help on using the changeset viewer.