Changeset 85809 in webkit
- Timestamp:
- May 4, 2011 4:56:38 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85807 r85809 1 2011-05-04 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 [results.html] Hide the entire table if all failures are expected 6 https://bugs.webkit.org/show_bug.cgi?id=60225 7 8 If in a port that uses expected results and all failures are expected, 9 hide the table as well as the rows when hiding expected failures. 10 11 * fast/harness/resources/results-test.js: 12 * fast/harness/results-expected.txt: 13 * fast/harness/results.html: 14 1 15 2011-05-04 Mark Pilgrim <pilgrim@chromium.org> 2 16 -
trunk/LayoutTests/fast/harness/resources/results-test.js
r85798 r85809 239 239 assertTrue(window.getComputedStyle(document.querySelectorAll('tbody')[0], null)['display'] != 'none'); 240 240 }); 241 242 results = mockResults(); 243 results.tests['only-expected-fail.html'] = mockExpectation('TEXT', 'TEXT'); 244 runTest(results, function() { 245 assertTrue(window.getComputedStyle(document.getElementById('results-table').parentNode, null)['display'] == 'none'); 246 }); 241 247 242 248 runDefaultSingleRowTest('bar-skip.html', 'TEXT', 'SKIP', true, '', ''); … … 304 310 results.uses_expectations_file = false; 305 311 runTest(results, function() { 312 assertTrue(window.getComputedStyle(document.getElementById('results-table').parentNode, null)['display'] != 'none'); 306 313 assertTrue(document.querySelectorAll('#results-table tbody td').length == 3); 307 314 assertTrue(!document.querySelector('tbody.expected')); -
trunk/LayoutTests/fast/harness/results-expected.txt
r85798 r85809 46 46 TEST-6: PASS 47 47 TEST-7: PASS 48 TEST-7: PASS49 TEST-7: PASS50 TEST-7: PASS51 TEST-7: PASS52 TEST-7: PASS53 48 TEST-8: PASS 54 49 TEST-8: PASS … … 96 91 TEST-15: PASS 97 92 TEST-15: PASS 93 TEST-15: PASS 94 TEST-15: PASS 95 TEST-15: PASS 98 96 TEST-16: PASS 99 97 TEST-16: PASS … … 102 100 TEST-17: PASS 103 101 TEST-17: PASS 104 TEST-17: PASS 102 TEST-18: PASS 103 TEST-18: PASS 105 104 TEST-18: PASS 106 105 TEST-18: PASS 107 106 TEST-19: PASS 108 107 TEST-19: PASS 109 TEST-19: PASS 110 TEST-19: PASS 108 TEST-20: PASS 109 TEST-20: PASS 110 TEST-20: PASS 111 111 TEST-20: PASS 112 112 TEST-20: PASS … … 114 114 TEST-21: PASS 115 115 TEST-22: PASS 116 TEST-22: PASS 116 117 TEST-23: PASS 117 TEST-2 3: PASS118 TEST-24: PASS 118 119 TEST-24: PASS 119 120 TEST-25: PASS 120 121 TEST-26: PASS 121 122 TEST-27: PASS 122 TEST-27: PASS123 TEST-27: PASS124 123 TEST-28: PASS 125 124 TEST-28: PASS 125 TEST-28: PASS 126 TEST-29: PASS 127 TEST-29: PASS -
trunk/LayoutTests/fast/harness/results.html
r85798 r85809 368 368 } 369 369 370 function processGlobalStateFor(testObject) 371 { 372 var test = testObject.name; 373 if (testObject.has_stderr) 374 globalState().testsWithStderr.push(testObject); 375 376 globalState().hasHttpTests = globalState().hasHttpTests || test.indexOf('http/') == 0; 377 378 var actual = testObject.actual; 379 if (actual == 'MISSING') { 380 // FIXME: make sure that new-run-webkit-tests spits out an -actual.txt file for 381 // tests with MISSING results. 382 globalState().newTests.push(testObject); 383 return; 384 } 385 386 var expected = testObject.expected || 'PASS'; 387 testObject.isExpected = true; 388 if (actual != 'SKIP' && globalState().results.uses_expectations_file) { 370 function isFailureExpected(expected, actual) 371 { 372 var isExpected = true; 373 if (actual != 'SKIP') { 389 374 var expectedArray = expected.split(' '); 390 375 var actualArray = actual.split(' '); … … 394 379 (expectedArray.indexOf('FAIL') == -1 || 395 380 (actualValue != 'IMAGE' && actualValue != 'TEXT' && actualValue != 'IMAGE+TEXT'))) 396 testObject.isExpected = false;381 isExpected = false; 397 382 } 398 383 } 384 return isExpected; 385 } 386 387 function processGlobalStateFor(testObject) 388 { 389 var test = testObject.name; 390 if (testObject.has_stderr) 391 globalState().testsWithStderr.push(testObject); 392 393 globalState().hasHttpTests = globalState().hasHttpTests || test.indexOf('http/') == 0; 394 395 var actual = testObject.actual; 396 if (actual == 'MISSING') { 397 // FIXME: make sure that new-run-webkit-tests spits out an -actual.txt file for 398 // tests with MISSING results. 399 globalState().newTests.push(testObject); 400 return; 401 } 402 403 var expected = testObject.expected || 'PASS'; 404 if (globalState().results.uses_expectations_file) 405 testObject.isExpected = isFailureExpected(expected, actual); 399 406 400 407 if (actual.indexOf(' ') != -1) { … … 897 904 return ''; 898 905 899 var html = '<p>' + title + ':</p>' + 906 var tableRowHtml = ''; 907 var hasUnexpected = false; 908 for (var i = 0; i < tests.length; i++) { 909 if (!tests[i].isExpected) 910 hasUnexpected = true; 911 tableRowHtml += tableRow(tests[i]); 912 } 913 914 var header = '<div'; 915 if (!hasUnexpected) 916 header += ' class=expected'; 917 918 header += '><p>' + title + ':</p>' + 900 919 '<table id="' + id + '"><thead><tr>' + 901 920 '<th>test</th>' + … … 904 923 905 924 if (globalState().results.uses_expectations_file) 906 h tml+= '<th>actual failure</th><th>expected failure</th>';925 header += '<th>actual failure</th><th>expected failure</th>'; 907 926 908 927 if (id == 'flaky-tests-table') 909 html += '<th>failures</th>'; 910 911 html += '</tr></thead>'; 912 913 for (var i = 0; i < tests.length; i++) 914 html += tableRow(tests[i]); 915 916 return html + '</table>'; 928 header += '<th>failures</th>'; 929 930 header += '</tr></thead>'; 931 932 933 return header + tableRowHtml + '</table></div>'; 917 934 } 918 935
Note: See TracChangeset
for help on using the changeset viewer.