Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 html { | 3 html { |
| 4 height: 100%; | 4 height: 100%; |
| 5 } | 5 } |
| 6 body { | 6 body { |
| 7 margin: 0; | 7 margin: 0; |
| 8 font-family: Helvetica, sans-serif; | 8 font-family: Helvetica, sans-serif; |
| 9 font-size: 11pt; | 9 font-size: 11pt; |
| 10 display: -webkit-flex; | 10 display: -webkit-flex; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 var expandLinks = visibleExpandLinks(); | 417 var expandLinks = visibleExpandLinks(); |
| 418 for (var i = 0, len = expandLinks.length; i < len; i++) | 418 for (var i = 0, len = expandLinks.length; i < len; i++) |
| 419 async(collapseExpectations, [expandLinks[i]]); | 419 async(collapseExpectations, [expandLinks[i]]); |
| 420 } | 420 } |
| 421 | 421 |
| 422 function shouldUseTracLinks() | 422 function shouldUseTracLinks() |
| 423 { | 423 { |
| 424 return !globalState().results.layout_tests_dir || !location.toString().index Of('file://') == 0; | 424 return !globalState().results.layout_tests_dir || !location.toString().index Of('file://') == 0; |
| 425 } | 425 } |
| 426 | 426 |
| 427 function testLink(test) | 427 function testLinkTarget(test) |
| 428 { | 428 { |
| 429 var target; | 429 var target; |
| 430 if (shouldUseTracLinks()) { | 430 if (shouldUseTracLinks()) { |
| 431 var revision = globalState().results.revision; | 431 var revision = globalState().results.revision; |
| 432 target = 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/' + tes t; | 432 target = 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/' + tes t; |
| 433 if (revision) | 433 if (revision) |
| 434 target += '?pathrev=' + revision; | 434 target += '?pathrev=' + revision; |
| 435 target += '#l1'; | 435 target += '#l1'; |
| 436 } else | 436 } else |
| 437 target = globalState().results.layout_tests_dir + '/' + test; | 437 target = globalState().results.layout_tests_dir + '/' + test; |
| 438 return target; | |
| 439 } | |
| 440 | |
| 441 function testLink(test) | |
| 442 { | |
| 443 var target = testLinkTarget(test); | |
| 438 return '<a class=test-link href="' + target + '">' + test + '</a><span class =flag onclick="unflag(this)"> \u2691</span>'; | 444 return '<a class=test-link href="' + target + '">' + test + '</a><span class =flag onclick="unflag(this)"> \u2691</span>'; |
| 439 } | 445 } |
| 440 | 446 |
| 441 function unflag(flag) | 447 function unflag(flag) |
| 442 { | 448 { |
| 443 var shouldFlag = false; | 449 var shouldFlag = false; |
| 444 TestNavigator.flagTest(parentOfType(flag, 'tbody'), shouldFlag); | 450 TestNavigator.flagTest(parentOfType(flag, 'tbody'), shouldFlag); |
| 445 } | 451 } |
| 446 | 452 |
| 447 function testLinkWithExpandButton(test) | 453 function testLinkWithExpandButton(test) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 509 if (text.textContent == 'Expected Image') { | 515 if (text.textContent == 'Expected Image') { |
| 510 text.textContent = 'Actual Image'; | 516 text.textContent = 'Actual Image'; |
| 511 image.src = image.getAttribute('data-prefix') + '-actual.png'; | 517 image.src = image.getAttribute('data-prefix') + '-actual.png'; |
| 512 } else { | 518 } else { |
| 513 text.textContent = 'Expected Image'; | 519 text.textContent = 'Expected Image'; |
| 514 image.src = image.getAttribute('data-prefix') + '-expected.png'; | 520 image.src = image.getAttribute('data-prefix') + '-expected.png'; |
| 515 } | 521 } |
| 516 } | 522 } |
| 517 } | 523 } |
| 518 | 524 |
| 519 function textResultLinks(prefix) | 525 function textResultLinks(test, prefix) |
| 520 { | 526 { |
| 521 var html = resultLink(prefix, '-expected.txt', 'expected') + | 527 var html = resultLink(prefix, '-expected.txt', 'expected') + |
| 522 resultLink(prefix, '-actual.txt', 'actual') + | 528 resultLink(prefix, '-actual.txt', 'actual') + |
| 523 resultLink(prefix, '-diff.txt', 'diff'); | 529 resultLink(prefix, '-diff.txt', 'diff'); |
| 524 | 530 |
| 525 if (globalState().results.has_pretty_patch) | 531 if (globalState().results.has_pretty_patch) |
| 526 html += resultLink(prefix, '-pretty-diff.html', 'pretty diff'); | 532 html += resultLink(prefix, '-pretty-diff.html', 'pretty diff'); |
| 527 | 533 |
| 528 if (globalState().results.has_wdiff) | 534 if (globalState().results.has_wdiff) |
| 529 html += resultLink(prefix, '-wdiff.html', 'wdiff'); | 535 html += resultLink(prefix, '-wdiff.html', 'wdiff'); |
| 530 | 536 |
| 537 html += resultLink(prefix, '-overlay.html?' + encodeURIComponent(testLinkTar get(test)), 'overlay'); | |
|
ojan
2014/02/25 00:43:42
It's a bit of a bummer to have the (broken) overla
Dirk Pranke
2014/02/27 20:57:44
Agreed. I don't want to display a link that is irr
| |
| 538 | |
| 531 return html; | 539 return html; |
| 532 } | 540 } |
| 533 | 541 |
| 534 function imageResultsCell(testObject, testPrefix, actual) { | 542 function imageResultsCell(testObject, testPrefix, actual) { |
| 535 var row = ''; | 543 var row = ''; |
| 536 | 544 |
| 537 if (actual.indexOf('IMAGE') != -1) { | 545 if (actual.indexOf('IMAGE') != -1) { |
| 538 globalState().hasImageFailures = true; | 546 globalState().hasImageFailures = true; |
| 539 | 547 |
| 540 if (testObject.reftest_type && testObject.reftest_type.indexOf('!=') != -1) { | 548 if (testObject.reftest_type && testObject.reftest_type.indexOf('!=') != -1) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 572 | 580 |
| 573 var testPrefix = stripExtension(testObject.name); | 581 var testPrefix = stripExtension(testObject.name); |
| 574 row += '<td>'; | 582 row += '<td>'; |
| 575 | 583 |
| 576 var actual = testObject.actual; | 584 var actual = testObject.actual; |
| 577 if (actual.indexOf('TEXT') != -1) { | 585 if (actual.indexOf('TEXT') != -1) { |
| 578 globalState().hasTextFailures = true; | 586 globalState().hasTextFailures = true; |
| 579 if (testObject.is_testharness_test) { | 587 if (testObject.is_testharness_test) { |
| 580 row += resultLink(testPrefix, '-actual.txt', 'actual'); | 588 row += resultLink(testPrefix, '-actual.txt', 'actual'); |
| 581 } else { | 589 } else { |
| 582 row += textResultLinks(testPrefix); | 590 row += textResultLinks(testObject.name, testPrefix); |
| 583 } | 591 } |
| 584 } | 592 } |
| 585 | 593 |
| 586 if (actual.indexOf('AUDIO') != -1) { | 594 if (actual.indexOf('AUDIO') != -1) { |
| 587 row += resultLink(testPrefix, '-expected.wav', 'expected audio'); | 595 row += resultLink(testPrefix, '-expected.wav', 'expected audio'); |
| 588 row += resultLink(testPrefix, '-actual.wav', 'actual audio'); | 596 row += resultLink(testPrefix, '-actual.wav', 'actual audio'); |
| 589 } | 597 } |
| 590 | 598 |
| 591 if (actual.indexOf('MISSING') != -1) { | 599 if (actual.indexOf('MISSING') != -1) { |
| 592 if (testObject.is_missing_audio) | 600 if (testObject.is_missing_audio) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 676 | 684 |
| 677 if (tableId == 'stderr-table') | 685 if (tableId == 'stderr-table') |
| 678 html += resultLink(stripExtension(test), '-stderr.txt', 'stderr'); | 686 html += resultLink(stripExtension(test), '-stderr.txt', 'stderr'); |
| 679 else if (tableId == 'passes-table') | 687 else if (tableId == 'passes-table') |
| 680 html += testObject.expected; | 688 html += testObject.expected; |
| 681 else if (tableId == 'crash-tests-table') { | 689 else if (tableId == 'crash-tests-table') { |
| 682 html += resultLink(stripExtension(test), '-crash-log.txt', 'crash lo g'); | 690 html += resultLink(stripExtension(test), '-crash-log.txt', 'crash lo g'); |
| 683 html += resultLink(stripExtension(test), '-sample.txt', 'sample'); | 691 html += resultLink(stripExtension(test), '-sample.txt', 'sample'); |
| 684 } else if (tableId == 'timeout-tests-table') { | 692 } else if (tableId == 'timeout-tests-table') { |
| 685 // FIXME: only include timeout actual/diff results here if we actual ly spit out results for timeout tests. | 693 // FIXME: only include timeout actual/diff results here if we actual ly spit out results for timeout tests. |
| 686 html += textResultLinks(stripExtension(test)); | 694 html += textResultLinks(test, stripExtension(test)); |
| 687 } | 695 } |
| 688 | 696 |
| 689 html += '</td></tr></tbody>'; | 697 html += '</td></tr></tbody>'; |
| 690 } | 698 } |
| 691 html += '</table></div>'; | 699 html += '</table></div>'; |
| 692 return html; | 700 return html; |
| 693 } | 701 } |
| 694 | 702 |
| 695 function toArray(nodeList) | 703 function toArray(nodeList) |
| 696 { | 704 { |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1371 updateTestlistCounts(); | 1379 updateTestlistCounts(); |
| 1372 | 1380 |
| 1373 TestNavigator.reset(); | 1381 TestNavigator.reset(); |
| 1374 OptionWriter.apply(); | 1382 OptionWriter.apply(); |
| 1375 } | 1383 } |
| 1376 </script> | 1384 </script> |
| 1377 <!-- HACK: when json_results_test.js is included, loading this page runs the tes ts. | 1385 <!-- HACK: when json_results_test.js is included, loading this page runs the tes ts. |
| 1378 It is not copied to the layout-test-results output directory. --> | 1386 It is not copied to the layout-test-results output directory. --> |
| 1379 <script src="resources/results-test.js"></script> | 1387 <script src="resources/results-test.js"></script> |
| 1380 <body onload="generatePage()"></body> | 1388 <body onload="generatePage()"></body> |
| OLD | NEW |