Changeset 84518 in webkit
- Timestamp:
- Apr 21, 2011 10:43:24 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r84514 r84518 1 2011-04-20 Ojan Vafai <ojan@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 put unexpected passes into their own table 6 https://bugs.webkit.org/show_bug.cgi?id=59016 7 8 * Scripts/webkitpy/layout_tests/layout_package/json_results.html: 9 1 10 2011-04-20 Ojan Vafai <ojan@chromium.org> 2 11 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results.html
r84514 r84518 9 9 } 10 10 11 t r:first-of-type:hover {11 tbody tr:first-of-type:hover { 12 12 opacity: 0.7 13 13 } … … 120 120 newTests: [], 121 121 results: {}, 122 testsWithStderr: [] 122 testsWithStderr: [], 123 unexpectedPassTests: [] 123 124 } 124 125 } … … 270 271 271 272 var expected = globalState().results.tests[test].expected || 'PASS'; 272 if (actual == 'PASS' && (!globalState().results.uses_expectations_file || expected == 'PASS')) 273 continue; 273 var isExpected = actual == 'SKIP'; 274 if (!isExpected && globalState().results.uses_expectations_file) { 275 var expectedArray = expected.split(' '); 276 if (expectedArray.indexOf(actual) != -1) 277 isExpected = true; 278 else if (expectedArray.indexOf('FAIL') != -1) 279 isExpected = actual == 'IMAGE' || actual == 'TEXT' || actual == 'IMAGE+TEXT'; 280 } 281 282 if (actual == 'PASS') { 283 if (!isExpected && expected != 'PASS') 284 globalState().unexpectedPassTests.push(test); 285 continue; 286 } 274 287 275 288 // FIXME: put unexpected passes in a separate table. … … 322 335 row += '<td>' + expected + '</td>'; 323 336 324 var isExpected = actual == 'SKIP';325 if (!isExpected && globalState().results.uses_expectations_file) {326 var expectedArray = expected.split(' ');327 if (expectedArray.indexOf(actual) != -1)328 isExpected = true;329 else if (expectedArray.indexOf('FAIL') != -1)330 isExpected = actual == 'IMAGE' || actual == 'TEXT' || actual == 'IMAGE+TEXT';331 }332 337 html += '<tbody class="' + (isExpected ? 'expected' : '') + '"><tr>' + row + '</tr></tbody>'; 333 338 } … … 335 340 } 336 341 337 function testList(tests, header, tableId , fileSuffix, linkName)342 function testList(tests, header, tableId) 338 343 { 339 344 tests.sort(); 340 345 341 346 var html = '<p>' + header + '</p><table id="' + tableId + '">'; 347 348 if (tableId == 'passes-table') 349 html += '<thead><th>test</th><th>expected failure type</th>'; 350 342 351 for (var i = 0; i < tests.length; i++) { 343 352 var test = tests[i]; 344 353 html += '<tbody><tr><td>' + testLink(test) + '</td><td>'; 345 354 346 if (fileSuffix.indexOf('actual') == -1) 347 html += resultLink(stripExtension(test), fileSuffix, linkName); 348 else { 355 if (tableId == 'stderr-table') 356 html += resultLink(stripExtension(test), '-stderr.txt', 'stderr'); 357 else if (tableId == 'passes-table') 358 html += globalState().results.tests[test].expected; 359 else if (tableId == 'new-tests-table') { 349 360 var testObject = globalState().results.tests[test]; 350 361 if (testObject.is_missing_audio) 351 362 html += resultLink(stripExtension(test), '-actual.wav', 'audio result'); 352 363 if (testObject.is_missing_text) 353 html += resultLink(stripExtension(test), fileSuffix, linkName);364 html += resultLink(stripExtension(test), '-actual.txt', 'result'); 354 365 if (testObject.is_missing_image) 355 366 html += resultLink(stripExtension(test), '-actual.png', 'png result'); … … 563 574 564 575 if (globalState().newTests.length) 565 html += testList(globalState().newTests, 'Tests that had no expected results (probably new):', 'new-tests-table' , '-actual.txt', 'result');576 html += testList(globalState().newTests, 'Tests that had no expected results (probably new):', 'new-tests-table'); 566 577 567 578 if (globalState().testsWithStderr.length) 568 html += testList(globalState().testsWithStderr, 'Tests that had stderr output:', 'stderr-table', '-stderr.txt', 'stderr'); 579 html += testList(globalState().testsWithStderr, 'Tests that had stderr output:', 'stderr-table'); 580 581 if (globalState().unexpectedPassTests.length) 582 html += testList(globalState().unexpectedPassTests, 'Tests expected to fail but passed:', 'passes-table'); 569 583 570 584 if (globalState().hasHttpTests) { -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_test.js
r84514 r84518 100 100 }); 101 101 102 results = mockResults(); 103 results.tests['foo/bar.html'] = mockExpectation('TEXT', 'PASS'); 104 results.tests['foo/bar1.html'] = mockExpectation('CRASH', 'PASS'); 105 results.tests['foo/bar2.html'] = mockExpectation('IMAGE', 'PASS'); 106 runTest(results, function() { 107 assertTrue(!document.getElementById('results-table')); 108 109 var testLinks = document.querySelectorAll('#passes-table .test-link'); 110 assertTrue(testLinks[0].textContent == 'foo/bar.html'); 111 assertTrue(testLinks[1].textContent == 'foo/bar1.html'); 112 assertTrue(testLinks[2].textContent == 'foo/bar2.html'); 113 114 var expectationTypes = document.querySelectorAll('#passes-table td:last-of-type'); 115 assertTrue(expectationTypes[0].textContent == 'TEXT'); 116 assertTrue(expectationTypes[1].textContent == 'CRASH'); 117 assertTrue(expectationTypes[2].textContent == 'IMAGE'); 118 119 }); 120 102 121 document.body.innerHTML = '<pre>' + g_log.join('\n') + '</pre>'; 103 122 }
Note: See TracChangeset
for help on using the changeset viewer.