OLD | NEW |
1 // To run these tests, load json_results.html in a browser. | 1 // To run these tests, load json_results.html in a browser. |
2 // You should see a series of PASS lines. | 2 // You should see a series of PASS lines. |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 | 5 |
6 var testStyles = document.createElement('style'); | 6 var testStyles = document.createElement('style'); |
7 testStyles.innerText = ".test-pass { color: green; } .test-fail { color: red; }"
; | 7 testStyles.innerText = ".test-pass { color: green; } .test-fail { color: red; }"
; |
8 document.querySelector('head').appendChild(testStyles); | 8 document.querySelector('head').appendChild(testStyles); |
9 | 9 |
10 var g_testIndex = 0; | 10 var g_testIndex = 0; |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 }); | 792 }); |
793 | 793 |
794 results = mockResults(); | 794 results = mockResults(); |
795 results.tests['foo/bar-image.html'] = mockExpectation('PASS', 'TEXT IMAGE'); | 795 results.tests['foo/bar-image.html'] = mockExpectation('PASS', 'TEXT IMAGE'); |
796 results.pixel_tests_enabled = false; | 796 results.pixel_tests_enabled = false; |
797 runTest(results, function() { | 797 runTest(results, function() { |
798 assertTrue(!document.getElementById('results-table')); | 798 assertTrue(!document.getElementById('results-table')); |
799 assertTrue(document.querySelector('#flaky-tests-table td:nth-child(3) a'
).getAttribute('href') == 'retries/foo/bar-image-diffs.html'); | 799 assertTrue(document.querySelector('#flaky-tests-table td:nth-child(3) a'
).getAttribute('href') == 'retries/foo/bar-image-diffs.html'); |
800 }); | 800 }); |
801 | 801 |
| 802 results = mockResults(); |
| 803 results.tests['foo'] = mockExpectation('PASS', 'TEXT'); |
| 804 results.tests['foo'].has_repaint_overlay = true; |
| 805 runTest(results, function() { |
| 806 assertTrue(document.querySelector('tbody td:nth-child(2)').textContent.i
ndexOf('overlay') != -1); |
| 807 }) |
| 808 |
802 document.body.innerHTML = '<pre>' + g_log.join('\n') + '</pre>'; | 809 document.body.innerHTML = '<pre>' + g_log.join('\n') + '</pre>'; |
803 } | 810 } |
804 | 811 |
805 var originalGeneratePage = generatePage; | 812 var originalGeneratePage = generatePage; |
806 generatePage = runTests; | 813 generatePage = runTests; |
OLD | NEW |