Title: [116162] trunk/Tools
Revision
116162
Author
[email protected]
Date
2012-05-04 13:50:41 -0700 (Fri, 04 May 2012)

Log Message

Show the results links in the embedded flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=85660

Reviewed by Adam Barth.

Turns out these links don't add much visual noise and it's annoying
to have to go to the dashboard from garden-o-matic just to view the
results for a test.

This is useful for cases where garden-o-matic doesn't properly show the
results (e.g. missing tests). If we address all those cases, then
we could easily hide the results links again if we wanted to.

* TestResultServer/static-dashboards/flakiness_dashboard.js:
(showUpdateInfoForTest):
(htmlForIndividualTestOnAllBuildersWithResultsLinks):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(test):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (116161 => 116162)


--- trunk/Tools/ChangeLog	2012-05-04 20:46:17 UTC (rev 116161)
+++ trunk/Tools/ChangeLog	2012-05-04 20:50:41 UTC (rev 116162)
@@ -1,3 +1,24 @@
+2012-05-04  Ojan Vafai  <[email protected]>
+
+        Show the results links in the embedded flakiness dashboard
+        https://bugs.webkit.org/show_bug.cgi?id=85660
+
+        Reviewed by Adam Barth.
+
+        Turns out these links don't add much visual noise and it's annoying
+        to have to go to the dashboard from garden-o-matic just to view the
+        results for a test.
+
+        This is useful for cases where garden-o-matic doesn't properly show the
+        results (e.g. missing tests). If we address all those cases, then
+        we could easily hide the results links again if we wanted to.
+
+        * TestResultServer/static-dashboards/flakiness_dashboard.js:
+        (showUpdateInfoForTest):
+        (htmlForIndividualTestOnAllBuildersWithResultsLinks):
+        * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+        (test):
+
 2012-05-04  Dirk Pranke  <[email protected]>
 
         Revert to using chromium --test-shell mode on SL in NRWT

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js (116161 => 116162)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js	2012-05-04 20:46:17 UTC (rev 116161)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js	2012-05-04 20:50:41 UTC (rev 116162)
@@ -1455,7 +1455,7 @@
     document.body.appendChild(checkboxes);
 
     var div = document.createElement('div');
-    div.innerHTML = htmlForIndividualTestOnAllBuildersWithChrome(test);
+    div.innerHTML = htmlForIndividualTestOnAllBuildersWithResultsLinks(test);
     document.body.appendChild(div);
     appendExpectations();
 }
@@ -1555,7 +1555,7 @@
     return htmlForTestTable(html) + skippedBuildersHtml;
 }
 
-function htmlForIndividualTestOnAllBuildersWithChrome(test)
+function htmlForIndividualTestOnAllBuildersWithResultsLinks(test)
 {
     processTestRunsForAllBuilders();
 
@@ -2116,7 +2116,6 @@
 function htmlForIndividualTests(tests)
 {
     var testsHTML = [];
-    var htmlForTestFunction = g_currentState.showChrome ? htmlForIndividualTestOnAllBuildersWithChrome : htmlForIndividualTestOnAllBuilders;
     for (var i = 0; i < tests.length; i++) {
         var test = tests[i];
         var testNameHtml = '';
@@ -2130,7 +2129,7 @@
                 testNameHtml += '<h2>' + test + '</h2>';
         }
 
-        testsHTML.push(testNameHtml + htmlForTestFunction(test));
+        testsHTML.push(testNameHtml + htmlForIndividualTestOnAllBuildersWithResultsLinks(test));
     }
     return testsHTML.join('<hr>');
 }

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js (116161 => 116162)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2012-05-04 20:46:17 UTC (rev 116161)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2012-05-04 20:50:41 UTC (rev 116162)
@@ -340,9 +340,9 @@
     equal(htmlForIndividualTestOnAllBuilders('foo/nonexistant.html'), '<div class="not-found">Test not found. Either it does not exist, is skipped or passes on all platforms.</div>');
 });
 
-test('HtmlForIndividualTestOnAllBuildersWithChromeNonexistant', 1, function() {
+test('HtmlForIndividualTestOnAllBuildersWithResultsLinksNonexistant', 1, function() {
     resetGlobals();
-    equal(htmlForIndividualTestOnAllBuildersWithChrome('foo/nonexistant.html'),
+    equal(htmlForIndividualTestOnAllBuildersWithResultsLinks('foo/nonexistant.html'),
         '<div class="not-found">Test not found. Either it does not exist, is skipped or passes on all platforms.</div>' +
         '<div class=expectations test=foo/nonexistant.html>' +
             '<div>' +
@@ -353,13 +353,13 @@
         '</div>');
 });
 
-test('HtmlForIndividualTestOnAllBuildersWithChrome', 1, function() {
+test('HtmlForIndividualTestOnAllBuildersWithResultsLinks', 1, function() {
     resetGlobals();
     var test = 'dummytest.html';
     var builderName = 'dummyBuilder';
     g_testToResultsMap[test] = [createResultsObjectForTest(test, builderName)];
 
-    equal(htmlForIndividualTestOnAllBuildersWithChrome(test),
+    equal(htmlForIndividualTestOnAllBuildersWithResultsLinks(test),
         '<table class=test-table><thead><tr>' +
                 '<th sortValue=test><div class=table-header-content><span></span><span class=header-text>test</span></div></th>' +
                 '<th sortValue=bugs><div class=table-header-content><span></span><span class=header-text>bugs</span></div></th>' +
@@ -384,14 +384,14 @@
         '</div>');
 });
 
-test('HtmlForIndividualTestOnAllBuildersWithChromeWebkitMaster', 1, function() {
+test('HtmlForIndividualTestOnAllBuildersWithResultsLinksWebkitMaster', 1, function() {
     resetGlobals();
     var test = 'dummytest.html';
     var builderName = 'dummyBuilder';
     BUILDER_TO_MASTER[builderName] = WEBKIT_BUILDER_MASTER;
     g_testToResultsMap[test] = [createResultsObjectForTest(test, builderName)];
 
-    equal(htmlForIndividualTestOnAllBuildersWithChrome(test),
+    equal(htmlForIndividualTestOnAllBuildersWithResultsLinks(test),
         '<table class=test-table><thead><tr>' +
                 '<th sortValue=test><div class=table-header-content><span></span><span class=header-text>test</span></div></th>' +
                 '<th sortValue=bugs><div class=table-header-content><span></span><span class=header-text>bugs</span></div></th>' +
@@ -428,25 +428,41 @@
     var tests = [test1, test2];
     equal(htmlForIndividualTests(tests),
         '<h2><a href="" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuilders(test1) + '<hr>' +
+        htmlForIndividualTestOnAllBuilders(test1) + 
+        '<div class=expectations test=foo/nonexistant.html>' +
+            '<div><span class=link _onclick_=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+            '<span class=link _onclick_=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+            '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
+        '</div>' +
+        '<hr>' +
         '<h2><a href="" target="_blank">bar/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuilders(test2));
+        htmlForIndividualTestOnAllBuilders(test2) +
+        '<div class=expectations test=bar/nonexistant.html>' +
+            '<div><span class=link _onclick_=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+            '<span class=link _onclick_=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+            '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
+        '</div>');
 
     tests = [test1];
-    equal(htmlForIndividualTests(tests), htmlForIndividualTestOnAllBuilders(test1));
+    equal(htmlForIndividualTests(tests), htmlForIndividualTestOnAllBuilders(test1) +
+        '<div class=expectations test=foo/nonexistant.html>' +
+            '<div><span class=link _onclick_=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+            '<span class=link _onclick_=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+            '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
+        '</div>');
 
     g_currentState.showChrome = true;
 
     equal(htmlForIndividualTests(tests),
         '<h2><a href="" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithChrome(test1));
+        htmlForIndividualTestOnAllBuildersWithResultsLinks(test1));
 
     tests = [test1, test2];
     equal(htmlForIndividualTests(tests),
         '<h2><a href="" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithChrome(test1) + '<hr>' +
+        htmlForIndividualTestOnAllBuildersWithResultsLinks(test1) + '<hr>' +
         '<h2><a href="" target="_blank">bar/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithChrome(test2));
+        htmlForIndividualTestOnAllBuildersWithResultsLinks(test2));
 });
 
 test('HtmlForSingleTestRow', 1, function() {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to