Title: [96329] trunk/Tools
Revision
96329
Author
aba...@webkit.org
Date
2011-09-29 08:46:55 -0700 (Thu, 29 Sep 2011)

Log Message

Unbreak the "update expectatations" button by using the existing
machinery to create the failureInfo objects.

Unbreak the "close" button on the progress dialog by using |this|
instead of the old name of the object.

Teach the controllers unit test not to talk to the actual network.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js (96328 => 96329)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js	2011-09-29 15:34:40 UTC (rev 96328)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js	2011-09-29 15:46:55 UTC (rev 96329)
@@ -81,11 +81,8 @@
     {
         var testName = this._view.currentTestName();
         return Object.keys(this._resultsByTest[testName]).map(function(builderName) {
-            return {
-                'testName': testName,
-                'builderName': builderName
-            };
-        });
+            return results.failureInfoForTestAndBuilder(this._resultsByTest, testName, builderName);
+        }.bind(this));
     },
     onRebaseline: function()
     {

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers_unittests.js (96328 => 96329)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers_unittests.js	2011-09-29 15:34:40 UTC (rev 96328)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers_unittests.js	2011-09-29 15:46:55 UTC (rev 96329)
@@ -31,39 +31,46 @@
 
 module("controllers");
 
-test("UnexpectedFailures", 2, function() {
-    var mockView = {};
-    var mockState = {
-        resultsByBuilder: kExampleResultsByBuilder
+test("UnexpectedFailures", 3, function() {
+    var simulator = new NetworkSimulator();
+
+    simulator.probe = function() {
     };
-    var expectedResultsByTest = null;
-    var mockDelegate = {
-        showResults: function(resultsView)
-        {
-            deepEqual(resultsView._resultsByTest, expectedResultsByTest);
+
+    simulator.runTest(function() {
+        var mockView = {};
+        var mockState = {
+            resultsByBuilder: kExampleResultsByBuilder
+        };
+        var expectedResultsByTest = null;
+        var mockDelegate = {
+            showResults: function(resultsView)
+            {
+                deepEqual(resultsView._resultsByTest, expectedResultsByTest);
+            }
         }
-    }
-    var controller = controllers.UnexpectedFailures(mockState, mockView, mockDelegate);
+        var controller = controllers.UnexpectedFailures(mockState, mockView, mockDelegate);
 
-    var testNameList = null;
-    var mockFailures = {
-        testNameList: function() { return testNameList; }
-    };
+        var testNameList = null;
+        var mockFailures = {
+            testNameList: function() { return testNameList; }
+        };
 
-    testNameList = ["scrollbars/custom-scrollbar-with-incomplete-style.html"];
-    expectedResultsByTest = {};
-    controller.onExamine(mockFailures);
+        testNameList = ["scrollbars/custom-scrollbar-with-incomplete-style.html"];
+        expectedResultsByTest = {};
+        controller.onExamine(mockFailures);
 
-    testNameList = ["userscripts/another-test.html"];
-    expectedResultsByTest = {
-      "userscripts/another-test.html": {
-        "Mock Builder": {
-          "expected": "PASS",
-          "actual": "TEXT"
-        }
-      }
-    };
-    controller.onExamine(mockFailures);
+        testNameList = ["userscripts/another-test.html"];
+        expectedResultsByTest = {
+          "userscripts/another-test.html": {
+            "Mock Builder": {
+              "expected": "PASS",
+              "actual": "TEXT"
+            }
+          }
+        };
+        controller.onExamine(mockFailures);
+    });
 });
 
 })();

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js (96328 => 96329)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js	2011-09-29 15:34:40 UTC (rev 96328)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js	2011-09-29 15:46:55 UTC (rev 96329)
@@ -162,7 +162,7 @@
     {
         this.addMessage(message);
         this.appendChild(new ui.actions.List([new ui.actions.Close()]));
-        $(statusView).bind('close', statusView.close.bind(statusView));
+        $(this).bind('close', statusView.close.bind(statusView));
     }
 });
 

Modified: trunk/Tools/ChangeLog (96328 => 96329)


--- trunk/Tools/ChangeLog	2011-09-29 15:34:40 UTC (rev 96328)
+++ trunk/Tools/ChangeLog	2011-09-29 15:46:55 UTC (rev 96329)
@@ -1,3 +1,17 @@
+2011-09-29  Adam Barth  <aba...@webkit.org>
+
+        Unbreak the "update expectatations" button by using the existing
+        machinery to create the failureInfo objects.
+
+        Unbreak the "close" button on the progress dialog by using |this|
+        instead of the old name of the object.
+
+        Teach the controllers unit test not to talk to the actual network.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers_unittests.js:
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
+
 2011-09-29  Hans Wennborg  <h...@chromium.org>
 
         IndexedDB: Use LevelDB also for in-memory databases
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to