Diff
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers/rebaseline.js (0 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers/rebaseline.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers/rebaseline.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function() {
+
+$(function() {
+ model.updateResultsByBuilder(function() {
+ var resultsView = new ui.results.View({
+ fetchResultsURLs: results.fetchResultsURLs
+ });
+
+ var failureByTest = results.expectedOrUnexpectedFailuresByTest(model.state.resultsByBuilder);
+ var controller = new contollers.ResultsDetails(resultsView, failureByTest);
+ document.body.appendChild(resultsView);
+ });
+});
+
+})();
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers.js (0 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var contollers = contollers || {};
+
+(function(){
+
+contollers.ResultsDetails = base.extends(Object, {
+ init: function(view, resultsByTest)
+ {
+ this._view = view;
+ this._resultsByTest = resultsByTest;
+
+ this._view.setTestList(Object.keys(this._resultsByTest));
+ $(this._view).bind('testselected', this.onTestSelected.bind(this));
+ $(this._view).bind('builderselected', this.onBuilderSelected.bind(this));
+ $(this._view).bind('rebaseline', this.onRebaseline.bind(this));
+ // FIXME: Bind the next/previous events.
+ },
+ _failureInfoForTestAndBuilder: function(testName, builderName)
+ {
+ return {
+ 'testName': testName,
+ 'builderName': builderName,
+ 'failureTypeList': results.failureTypeList(this._resultsByTest[testName][builderName].actual)
+ }
+ },
+ dismiss: function()
+ {
+ $(this._view).detach();
+ },
+ showTest: function(testName)
+ {
+ var builderNameList = Object.keys(this._resultsByTest[testName]);
+ this._view.setBuilderList(builderNameList)
+ this._view.showResults(this._failureInfoForTestAndBuilder(testName, builderNameList[0]));
+ },
+ onTestSelected: function(event, testName)
+ {
+ this.showTest(testName)
+ },
+ onBuilderSelected: function() {
+ this._view.showResults(this._failureInfoForTestAndBuilder(this._view.currentTestName(), this._view.currentBuilderName()));
+ },
+ onRebaseline: function() {
+ var testName = this._view.currentTestName();
+ var builderName = this._view.currentBuilderName();
+ model.queueForRebaseline({
+ 'testName': testName,
+ 'builderName': builderName
+ });
+ }
+});
+
+})();
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html 2011-08-17 20:15:59 UTC (rev 93236)
@@ -39,7 +39,7 @@
<button class="show-selected-failures">Show Selected Failures</button><button class="rebaseline-selected">Rebaseline Selected</button><button class="update-expectations-selected">Mark Selected as Expected</button><button class="refresh">Refresh</button>
</div>
<div class="recent-history"></div>
-<div class="results-detail">
+<div class="results-detail results-view old-results-view">
<div class="toolbar">
<div class="actions">
<button class="rebaseline default">Add to Rebaseline Queue</button><button class="update-expectation">Mark Failure as Expected</button><button class="previous">◀</button><button class="next">▶</button><button class="dismiss">Close</button>
@@ -61,6 +61,7 @@
<script src=""
<script src=""
<script src=""
+<script src=""
<script src=""
</body>
</html>
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css 2011-08-17 20:15:59 UTC (rev 93236)
@@ -271,24 +271,28 @@
border-radius: 4px;
}
-/*** results-detail ***/
+/*** results-view ***/
-.results-detail {
+/* FIXME: Remove this once garden-o-matic switches to the new results view. */
+.old-results-view {
display: none;
position: fixed;
- background-color: #f5f5f5;
- top: 25%;
left: 0px;
right: 0px;
+ top: 25%;
bottom: 0px;
}
-.results-detail .toolbar {
+.results-view {
+ background-color: #f5f5f5;
+}
+
+.results-view .toolbar {
border-top: 1px solid #c6c6c6;
border-bottom: 1px solid #c6c6c6;
}
-.results-detail .toolbar .status {
+.results-view .toolbar .selector {
font-size: 11px;
font-weight: bold;
height: 29px;
@@ -297,20 +301,16 @@
padding: 0 8px;
}
-.results-detail .toolbar .status .builder-name {
- font-weight: normal;
- padding-left: 20px;
+.results-view .test-selector {
+ width: 400px;
+ margin-right: 6px;
}
-.results-detail .toolbar .status .selected {
- font-style: italic;
-}
-
-.results-detail .toolbar .actions {
+.results-view .toolbar .actions {
float: right;
}
-.results-detail .content {
+.results-detail td {
background-color: white;
}
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -171,7 +171,7 @@
return {
'builderName': failureDetails.attr(config.kBuilderNameAttr),
'testName': failureDetails.attr(config.kTestNameAttr),
- 'failureTypeList': failureDetails.attr(config.kFailureTypesAttr).split(' '),
+ 'failureTypeList': results.failureTypeList(failureDetails.attr(config.kFailureTypesAttr)),
}
}
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html (0 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html 2011-08-17 20:15:59 UTC (rev 93236)
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<!--
+Copyright (C) 2011 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<html>
+<head>
+<title>Garden-O-Matic Rebaseline</title>
+<link rel="stylesheet" href=""
+<link rel="stylesheet" href=""
+</head>
+<body>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</body>
+</html>
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/results.js (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/results.js 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/results.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -163,6 +163,11 @@
}
};
+results.failureTypeList = function(failureBlob)
+{
+ return failureBlob.split(' ');
+};
+
results.canRebaseline = function(failureTypeList)
{
return failureTypeList.some(function(element) {
@@ -205,19 +210,29 @@
results.unexpectedResults = function(resultNode)
{
- var actualResults = resultNode.actual.split(' ');
- var expectedResults = addImpliedExpectations(resultNode.expected.split(' '))
+ var actualResults = results.failureTypeList(resultNode.actual);
+ var expectedResults = addImpliedExpectations(results.failureTypeList(resultNode.expected))
return $.grep(actualResults, function(result) {
return expectedResults.indexOf(result) == -1;
});
};
+function isExpectedOrUnexpectedFailure(resultNode)
+{
+ if (!resultNode)
+ return false;
+ var actualResults = results.failureTypeList(resultNode.actual);
+ if (anyIsSuccess(actualResults))
+ return false;
+ return anyIsFailure(actualResults);
+}
+
function isUnexpectedFailure(resultNode)
{
if (!resultNode)
return false;
- if (anyIsSuccess(resultNode.actual.split(' ')))
+ if (anyIsSuccess(results.failureTypeList(resultNode.actual)))
return false;
return anyIsFailure(results.unexpectedResults(resultNode));
}
@@ -226,7 +241,7 @@
{
if (!resultNode)
return false;
- if (anyIsFailure(resultNode.actual.split(' ')))
+ if (anyIsFailure(results.failureTypeList(resultNode.actual)))
return false;
return anyIsSuccess(results.unexpectedResults(resultNode));
}
@@ -236,6 +251,11 @@
return !!node.actual;
}
+results.expectedOrUnexpectedFailures = function(resultsTree)
+{
+ return base.filterTree(resultsTree.tests, isResultNode, isExpectedOrUnexpectedFailure);
+};
+
results.unexpectedFailures = function(resultsTree)
{
return base.filterTree(resultsTree.tests, isResultNode, isUnexpectedFailure);
@@ -260,6 +280,11 @@
return resultsByTest;
}
+results.expectedOrUnexpectedFailuresByTest = function(resultsByBuilder)
+{
+ return resultsByTest(resultsByBuilder, results.expectedOrUnexpectedFailures);
+};
+
results.unexpectedFailuresByTest = function(resultsByBuilder)
{
return resultsByTest(resultsByBuilder, results.unexpectedFailures);
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html 2011-08-17 20:15:59 UTC (rev 93236)
@@ -27,6 +27,7 @@
<head>
<link rel="stylesheet" href=""
<script src=""
+<script src=""
<script src=""
</head>
<body>
@@ -53,6 +54,8 @@
<script src=""
<script src=""
<script src=""
+<script src="" <!-- This script is slightly of order. -->
+<script src=""
<script src=""
<script src=""
<script src=""
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results.js (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results.js 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -1,3 +1,28 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
var ui = ui || {};
ui.results = ui.results || {};
@@ -111,4 +136,131 @@
}
});
+ui.results.ResultsDetails = base.extends('div', {
+ init: function(delegate)
+ {
+ this.className = 'results-detail';
+ this._delegate = delegate;
+ },
+ show: function(failureInfo) {
+ this._delegate.fetchResultsURLs(failureInfo, function(resultsURLs) {
+ var resultsGrid = new ui.results.ResultsGrid();
+ resultsGrid.addResults(resultsURLs);
+ $(this).empty().append(resultsGrid);
+ }.bind(this));
+ },
+});
+
+ui.results.TestSelector = base.extends('input', {
+ init: function()
+ {
+ this.className = 'test-selector';
+ this.type = 'text';
+ this.placeholder = 'Test name';
+ },
+ setTestList: function(testNameList)
+ {
+ $(this).autocomplete({
+ source: testNameList,
+ select: function(event, selected) {
+ $(this).trigger('testselected', [selected.item.value]);
+ }.bind(this)
+ });
+ }
+});
+
+ui.results.BuilderSelector = base.extends('select', {
+ init: function()
+ {
+ this.className = 'builder-selector';
+ $(this).hide();
+ $(this).change(function() {
+ $(this).trigger('builderselected');
+ }.bind(this));
+ },
+ show: function(builderNameList) {
+ $(this).empty();
+ $(this).show();
+ builderNameList.forEach(function(builderName) {
+ var builderElement = document.createElement('option');
+ builderElement.textContent = ui.displayNameForBuilder(builderName);
+ builderElement.value = builderName;
+ this.appendChild(builderElement);
+ }.bind(this));
+ },
+ select: function(builderName) {
+ var builderIndex = -1;
+ for (var i = 0; i < this.options.length; ++i) {
+ if (this.options[i].value == builderName) {
+ builderIndex = i;
+ break;
+ }
+ }
+ if (builderIndex == -1)
+ return;
+ this.selectedIndex = builderIndex;
+ },
+ selectedBuilder: function() {
+ if (this.selectedIndex == -1)
+ return;
+ return this.options[this.selectedIndex].value;
+ }
+});
+
+ui.results.Actions = base.extends('div', {
+ init: function()
+ {
+ this.className = 'actions';
+ this.innerHTML = '<button class="rebaseline default">Rebaseline</button>' +
+ '<button class="previous">◀</button>' +
+ '<button class="next">▶</button>';
+ this._routeClickEvent('.rebaseline', 'rebaseline');
+ this._routeClickEvent('.previous', 'previous');
+ this._routeClickEvent('.next', 'next');
+ },
+ _routeClickEvent: function(selector, eventName) {
+ $(selector, this).bind('click', function() {
+ $(this).trigger(eventName);
+ }.bind(this));
+ }
+});
+
+ui.results.View = base.extends('div', {
+ init: function(delegate)
+ {
+ this.className = 'results-view';
+ this.innerHTML = '<div class="toolbar"><div class="selector"></div></div><div class="content"></div>';
+
+ this._testSelector = new ui.results.TestSelector();
+ this._builderSelector = new ui.results.BuilderSelector();
+ this._resultsDetails = new ui.results.ResultsDetails(delegate);
+
+ $('.toolbar', this).prepend(new ui.results.Actions())
+ $('.selector', this).append(this._testSelector).append(this._builderSelector);
+ $('.content', this).append(this._resultsDetails);
+ },
+ setTestList: function(testNameList)
+ {
+ this._testSelector.setTestList(testNameList);
+ },
+ currentTestName: function()
+ {
+ return this._testSelector.value;
+ },
+ currentBuilderName: function()
+ {
+ return this._builderSelector.selectedBuilder();
+ },
+ setBuilderList: function(buildNameList)
+ {
+ this._builderSelector.show(buildNameList);
+ },
+ showResults: function(failureInfo)
+ {
+ this._testSelector.value = failureInfo.testName;
+ this._builderSelector.select(failureInfo.builderName);
+ this._resultsDetails.show(failureInfo);
+ }
+});
+
})();
Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results_unittests.js (0 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results_unittests.js (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results_unittests.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+(function () {
+
+module("iu.results");
+
+var kExampleResultsByTest = {
+ "scrollbars/custom-scrollbar-with-incomplete-style.html": {
+ "Mock Builder": {
+ "expected": "IMAGE",
+ "actual": "CRASH"
+ },
+ "Mock Linux": {
+ "expected": "TEXT",
+ "actual": "CRASH"
+ }
+ },
+ "userscripts/another-test.html": {
+ "Mock Builder": {
+ "expected": "PASS",
+ "actual": "TEXT"
+ }
+ }
+}
+
+test("View", 6, function() {
+ var resultsView = new ui.results.View({
+ fetchResultsURLs: $.noop
+ });
+ var controller = new contollers.ResultsDetails(resultsView, kExampleResultsByTest);
+ controller.showTest("scrollbars/custom-scrollbar-with-incomplete-style.html");
+ equal(resultsView.currentTestName(), "scrollbars/custom-scrollbar-with-incomplete-style.html");
+ equal(resultsView.currentBuilderName(), "Mock Builder");
+ resultsView.showResults({
+ "testName": "userscripts/another-test.html",
+ "builderName": "Mock Builder",
+ });
+ equal(resultsView.currentTestName(), "userscripts/another-test.html");
+ equal(resultsView.currentBuilderName(), "Mock Builder");
+ resultsView.showResults({
+ "testName": "scrollbars/custom-scrollbar-with-incomplete-style.html",
+ "builderName": "Mock Linux",
+ });
+ equal(resultsView.currentTestName(), "scrollbars/custom-scrollbar-with-incomplete-style.html");
+ equal(resultsView.currentBuilderName(), "Mock Linux");
+})
+
+})();
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js (93235 => 93236)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js 2011-08-17 20:15:59 UTC (rev 93236)
@@ -27,14 +27,14 @@
(function () {
-function displayURLForBuilder(builderName)
+ui.displayURLForBuilder = function(builderName)
{
return 'http://build.chromium.org/p/chromium.webkit/waterfall?' + $.param({
'builder': builderName
});
}
-function displayNameForBuilder(builderName)
+ui.displayNameForBuilder = function(builderName)
{
return builderName.replace(/Webkit /, '');
}
@@ -57,7 +57,7 @@
$.each(builderNameList, function(index, builderName) {
var listElement = $('<li><a target="_blank"></a></li>');
list.append(listElement);
- $('a', listElement).attr('href', displayURLForBuilder(builderName)).text(displayNameForBuilder(builderName));
+ $('a', listElement).attr('href', ui.displayURLForBuilder(builderName)).text(ui.displayNameForBuilder(builderName));
});
return block;
@@ -91,7 +91,7 @@
$.each(config.kBuilders, function(index, builderName) {
var block = $('<td class="builder"></td>');
- block.attr('title', displayNameForBuilder(builderName));
+ block.attr('title', ui.displayNameForBuilder(builderName));
block.attr(config.kBuilderNameAttr, builderName);
if (builderName in resultNodesByBuilder) {
@@ -132,7 +132,7 @@
var failureTypes = $(this).attr(config.kFailureTypesAttr);
if (!failureTypes)
return
- var failureTypeList = failureTypes.split(' ');
+ var failureTypeList = results.failureTypeList(failureTypes);
var builderName = $(this).attr(config.kBuilderNameAttr);
failureInfoList.push({
'testName': testName,
Modified: trunk/Tools/ChangeLog (93235 => 93236)
--- trunk/Tools/ChangeLog 2011-08-17 19:59:57 UTC (rev 93235)
+++ trunk/Tools/ChangeLog 2011-08-17 20:15:59 UTC (rev 93236)
@@ -1,3 +1,34 @@
+2011-08-17 Adam Barth <[email protected]>
+
+ garden-o-matic should be able to rebaseline expected failures
+ https://bugs.webkit.org/show_bug.cgi?id=66204
+
+ Reviewed by Dimitri Glazkov.
+
+ This patch introduces a new view for displaying expect, actual, and
+ differences between results. The new view also has a fledgling
+ controller that handles some basic operations. The new view is
+ exercised by rebaseline.html, which lets you rebaselines expected
+ failures, but the new view is not fully integrated into
+ garden-o-matic.html
+
+ More patches will be required to make this stuff fully working, but
+ this patch was already somewhat spiraling out of control. Hopefully
+ this patch will serve as a good starting point for further development.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers.js: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/controllers/rebaseline.js: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.css:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html: Added.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/results.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ui/results_unittests.js: Added.
+
2011-08-16 Chang Shu <[email protected]>
Support reset in WebCore::Internals