diff options
author | ojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 22:19:36 +0000 |
---|---|---|
committer | ojan@chromium.org <ojan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 22:19:36 +0000 |
commit | 08d0dfad3f9a7ba326a274704fa7e95165c9dca1 (patch) | |
tree | 53aac12d952c06a4d0ed85cf611fcc0c75c0ca15 /webkit/tools/layout_tests/flakiness_dashboard.html | |
parent | 8f28d63586a48273a6e05bba97e3cb7d5c5d8cb0 (diff) | |
download | chromium_src-08d0dfad3f9a7ba326a274704fa7e95165c9dca1.zip chromium_src-08d0dfad3f9a7ba326a274704fa7e95165c9dca1.tar.gz chromium_src-08d0dfad3f9a7ba326a274704fa7e95165c9dca1.tar.bz2 |
A couple usability improvements to the dashboard:
1. Pick a color for wrong-expectations that is more different from
the browser's selection color.
2. Make the webkit merge color grey instead of black to avoid confusing
it with passing results.
3. Make single-clicking on test paths select the whole test path for
easier copy-pasting.
One functionality improvement. Walk through the paths in test_expectations
in sorted order, not reverse sorted. We want to hit the more specific expectations
*last*, but we were hitting them first. So the less-specific expectations
(e.g. LayoutTests/foo) were overriding the more-specific (e.g. LayoutTests/foo/bar.html).
Review URL: http://codereview.chromium.org/249060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/layout_tests/flakiness_dashboard.html')
-rw-r--r-- | webkit/tools/layout_tests/flakiness_dashboard.html | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/webkit/tools/layout_tests/flakiness_dashboard.html b/webkit/tools/layout_tests/flakiness_dashboard.html index 4544be3..90eeabd 100644 --- a/webkit/tools/layout_tests/flakiness_dashboard.html +++ b/webkit/tools/layout_tests/flakiness_dashboard.html @@ -99,7 +99,7 @@ } .test-table .wrong-expectations, .wrong-expectations { - background-color: #afdaff; + background-color: #pink; } .P { background-color: #8fdf5f; @@ -126,7 +126,7 @@ background-color: #69f; } .merge { - background-color: green; + background-color: grey; } :not(#legend-contents) > .merge { width: 1px; @@ -653,10 +653,10 @@ {path: path, expectations: expectationsByTest[path]}); } - // Reverse sort the array to hit more specific paths last. More specific + // Sort the array to hit more specific paths last. More specific // paths (e.g. foo/bar/baz.html) override entries for less-specific ones // (e.g. foo/bar). - expectationsArray.sort(getAlphanumericCompare('path', true)); + expectationsArray.sort(); var allTests = getAllTests(); for (var i = 0; i < expectationsArray.length; i++) { @@ -944,11 +944,13 @@ buildInfo.buildType + ':</h2>'; } + var open = '<div onclick="selectContents(this)">'; + if (tests.length) { html += '<h3>Have not failed in last ' + resultsByBuilder[builder].buildNumbers.length + - ' runs.</h3><div id="passing-tests"><div>' + - tests.join('</div><div>') + '</div></div>'; + ' runs.</h3><div id="passing-tests">' + open + + tests.join('</div>' + open) + '</div></div>'; } if (skippedPaths.length) { @@ -958,8 +960,8 @@ '</h3>'; if (currentState.showSkipped) { - html += '<div id="passing-tests"><div>' + - skippedPaths.join('</div><div>') + '</div></div>'; + html += '<div id="passing-tests">' + open + + skippedPaths.join('</div>' + open) + '</div></div>'; } } return html; @@ -1037,6 +1039,13 @@ return !currentState.showFlaky && isTestFlaky(testResult); } + /** + * Sets the browser's selection to the element's contents. + */ + function selectContents(element) { + window.getSelection().selectAllChildren(element); + } + function getHTMLForSingleTestRow(test, builder, opt_isCrossBuilderView) { if (shouldHideTest(test)) { // The innerHTML call is considerably faster if we exclude the rows for @@ -1049,7 +1058,7 @@ // instead of test paths. var testCellHTML = opt_isCrossBuilderView ? builder : '<span class="link" onclick="showPopupForTest(event, \'' + test.test + - '\');return false;">' + test.test + '</span>'; + '\');selectContents(this);return false;">' + test.test + '</span>'; return '<tr class="' + (test.meetsExpectations ? '' : 'wrong-expectations') + |