| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 var expandLinks = visibleExpandLinks(); | 418 var expandLinks = visibleExpandLinks(); |
| 419 for (var i = 0, len = expandLinks.length; i < len; i++) | 419 for (var i = 0, len = expandLinks.length; i < len; i++) |
| 420 async(collapseExpectations, [expandLinks[i]]); | 420 async(collapseExpectations, [expandLinks[i]]); |
| 421 } | 421 } |
| 422 | 422 |
| 423 function shouldUseTracLinks() | 423 function shouldUseTracLinks() |
| 424 { | 424 { |
| 425 return !globalState().results.layout_tests_dir || !location.toString().index
Of('file://') == 0; | 425 return !globalState().results.layout_tests_dir || !location.toString().index
Of('file://') == 0; |
| 426 } | 426 } |
| 427 | 427 |
| 428 function testLink(test) | 428 function testLinkTarget(test) |
| 429 { | 429 { |
| 430 var target; | 430 var target; |
| 431 if (shouldUseTracLinks()) { | 431 if (shouldUseTracLinks()) { |
| 432 var revision = globalState().results.revision; | 432 var revision = globalState().results.revision; |
| 433 target = 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/' + tes
t; | 433 target = 'http://src.chromium.org/viewvc/blink/trunk/LayoutTests/' + tes
t; |
| 434 if (revision) | 434 if (revision) |
| 435 target += '?pathrev=' + revision; | 435 target += '?pathrev=' + revision; |
| 436 target += '#l1'; | 436 target += '#l1'; |
| 437 } else | 437 } else |
| 438 target = globalState().results.layout_tests_dir + '/' + test; | 438 target = globalState().results.layout_tests_dir + '/' + test; |
| 439 return target; |
| 440 } |
| 441 |
| 442 function testLink(test) |
| 443 { |
| 444 var target = testLinkTarget(test); |
| 439 return '<a class=test-link href="' + target + '">' + test + '</a><span class
=flag onclick="unflag(this)"> \u2691</span>'; | 445 return '<a class=test-link href="' + target + '">' + test + '</a><span class
=flag onclick="unflag(this)"> \u2691</span>'; |
| 440 } | 446 } |
| 441 | 447 |
| 442 function unflag(flag) | 448 function unflag(flag) |
| 443 { | 449 { |
| 444 var shouldFlag = false; | 450 var shouldFlag = false; |
| 445 TestNavigator.flagTest(parentOfType(flag, 'tbody'), shouldFlag); | 451 TestNavigator.flagTest(parentOfType(flag, 'tbody'), shouldFlag); |
| 446 } | 452 } |
| 447 | 453 |
| 448 function testLinkWithExpandButton(test) | 454 function testLinkWithExpandButton(test) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 if (text.textContent == 'Expected Image') { | 521 if (text.textContent == 'Expected Image') { |
| 516 text.textContent = 'Actual Image'; | 522 text.textContent = 'Actual Image'; |
| 517 image.src = image.getAttribute('data-prefix') + '-actual.png'; | 523 image.src = image.getAttribute('data-prefix') + '-actual.png'; |
| 518 } else { | 524 } else { |
| 519 text.textContent = 'Expected Image'; | 525 text.textContent = 'Expected Image'; |
| 520 image.src = image.getAttribute('data-prefix') + '-expected.png'; | 526 image.src = image.getAttribute('data-prefix') + '-expected.png'; |
| 521 } | 527 } |
| 522 } | 528 } |
| 523 } | 529 } |
| 524 | 530 |
| 525 function textResultLinks(prefix) | 531 function textResultLinks(test, prefix, hasRepaintOverlay) |
| 526 { | 532 { |
| 527 var html = resultLink(prefix, '-expected.txt', 'expected') + | 533 var html = resultLink(prefix, '-expected.txt', 'expected') + |
| 528 resultLink(prefix, '-actual.txt', 'actual') + | 534 resultLink(prefix, '-actual.txt', 'actual') + |
| 529 resultLink(prefix, '-diff.txt', 'diff'); | 535 resultLink(prefix, '-diff.txt', 'diff'); |
| 530 | 536 |
| 531 if (globalState().results.has_pretty_patch) | 537 if (globalState().results.has_pretty_patch) |
| 532 html += resultLink(prefix, '-pretty-diff.html', 'pretty diff'); | 538 html += resultLink(prefix, '-pretty-diff.html', 'pretty diff'); |
| 533 | 539 |
| 534 if (globalState().results.has_wdiff) | 540 if (globalState().results.has_wdiff) |
| 535 html += resultLink(prefix, '-wdiff.html', 'wdiff'); | 541 html += resultLink(prefix, '-wdiff.html', 'wdiff'); |
| 536 | 542 |
| 543 if (hasRepaintOverlay) |
| 544 html += resultLink(prefix, '-overlay.html?' + encodeURIComponent(testLin
kTarget(test)), 'overlay'); |
| 545 |
| 537 return html; | 546 return html; |
| 538 } | 547 } |
| 539 | 548 |
| 540 function imageResultsCell(testObject, testPrefix, actual) { | 549 function imageResultsCell(testObject, testPrefix, actual) { |
| 541 var row = ''; | 550 var row = ''; |
| 542 | 551 |
| 543 if (actual.indexOf('IMAGE') != -1) { | 552 if (actual.indexOf('IMAGE') != -1) { |
| 544 globalState().hasImageFailures = true; | 553 globalState().hasImageFailures = true; |
| 545 | 554 |
| 546 if (testObject.reftest_type && testObject.reftest_type.indexOf('!=') !=
-1) { | 555 if (testObject.reftest_type && testObject.reftest_type.indexOf('!=') !=
-1) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 587 |
| 579 var testPrefix = stripExtension(testObject.name); | 588 var testPrefix = stripExtension(testObject.name); |
| 580 row += '<td>'; | 589 row += '<td>'; |
| 581 | 590 |
| 582 var actual = testObject.actual; | 591 var actual = testObject.actual; |
| 583 if (actual.indexOf('TEXT') != -1) { | 592 if (actual.indexOf('TEXT') != -1) { |
| 584 globalState().hasTextFailures = true; | 593 globalState().hasTextFailures = true; |
| 585 if (testObject.is_testharness_test) { | 594 if (testObject.is_testharness_test) { |
| 586 row += resultLink(testPrefix, '-actual.txt', 'actual'); | 595 row += resultLink(testPrefix, '-actual.txt', 'actual'); |
| 587 } else { | 596 } else { |
| 588 row += textResultLinks(testPrefix); | 597 row += textResultLinks(testObject.name, testPrefix, testObject.has_r
epaint_overlay); |
| 589 } | 598 } |
| 590 } | 599 } |
| 591 | 600 |
| 592 if (actual.indexOf('AUDIO') != -1) { | 601 if (actual.indexOf('AUDIO') != -1) { |
| 593 row += resultLink(testPrefix, '-expected.wav', 'expected audio'); | 602 row += resultLink(testPrefix, '-expected.wav', 'expected audio'); |
| 594 row += resultLink(testPrefix, '-actual.wav', 'actual audio'); | 603 row += resultLink(testPrefix, '-actual.wav', 'actual audio'); |
| 595 } | 604 } |
| 596 | 605 |
| 597 if (actual.indexOf('MISSING') != -1) { | 606 if (actual.indexOf('MISSING') != -1) { |
| 598 if (testObject.is_missing_audio) | 607 if (testObject.is_missing_audio) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 html += testObject.expected; | 702 html += testObject.expected; |
| 694 else if (tableId == 'crash-tests-table') { | 703 else if (tableId == 'crash-tests-table') { |
| 695 html += resultLink(stripExtension(test), '-crash-log.txt', 'crash lo
g'); | 704 html += resultLink(stripExtension(test), '-crash-log.txt', 'crash lo
g'); |
| 696 html += resultLink(stripExtension(test), '-sample.txt', 'sample'); | 705 html += resultLink(stripExtension(test), '-sample.txt', 'sample'); |
| 697 if (testObject.has_stderr) | 706 if (testObject.has_stderr) |
| 698 html += resultLink(stripExtension(test), '-stderr.txt', 'stderr'
); | 707 html += resultLink(stripExtension(test), '-stderr.txt', 'stderr'
); |
| 699 } else if (tableId == 'leak-tests-table') | 708 } else if (tableId == 'leak-tests-table') |
| 700 html += resultLink(stripExtension(test), '-leak-log.txt', 'leak log'
); | 709 html += resultLink(stripExtension(test), '-leak-log.txt', 'leak log'
); |
| 701 else if (tableId == 'timeout-tests-table') { | 710 else if (tableId == 'timeout-tests-table') { |
| 702 // FIXME: only include timeout actual/diff results here if we actual
ly spit out results for timeout tests. | 711 // FIXME: only include timeout actual/diff results here if we actual
ly spit out results for timeout tests. |
| 703 html += textResultLinks(stripExtension(test)); | 712 html += textResultLinks(test, stripExtension(test), testObject.has_r
epaint_overlay); |
| 704 } | 713 } |
| 705 | 714 |
| 706 html += '</td></tr></tbody>'; | 715 html += '</td></tr></tbody>'; |
| 707 } | 716 } |
| 708 html += '</table></div>'; | 717 html += '</table></div>'; |
| 709 return html; | 718 return html; |
| 710 } | 719 } |
| 711 | 720 |
| 712 function toArray(nodeList) | 721 function toArray(nodeList) |
| 713 { | 722 { |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 updateTestlistCounts(); | 1399 updateTestlistCounts(); |
| 1391 | 1400 |
| 1392 TestNavigator.reset(); | 1401 TestNavigator.reset(); |
| 1393 OptionWriter.apply(); | 1402 OptionWriter.apply(); |
| 1394 } | 1403 } |
| 1395 </script> | 1404 </script> |
| 1396 <!-- HACK: when json_results_test.js is included, loading this page runs the tes
ts. | 1405 <!-- HACK: when json_results_test.js is included, loading this page runs the tes
ts. |
| 1397 It is not copied to the layout-test-results output directory. --> | 1406 It is not copied to the layout-test-results output directory. --> |
| 1398 <script src="resources/results-test.js"></script> | 1407 <script src="resources/results-test.js"></script> |
| 1399 <body onload="generatePage()"></body> | 1408 <body onload="generatePage()"></body> |
| OLD | NEW |