Title: [199180] trunk/Tools
Revision
199180
Author
[email protected]
Date
2016-04-07 14:08:40 -0700 (Thu, 07 Apr 2016)

Log Message

Adding layout tests for the bot watcher's dashboard QUnit tests. https://bugs.webkit.org/show_bug.cgi?id=155272

Reviewed by Daniel Bates.

Moved supporting resources into a resources folder and updated index.html accordingly
to point to the new locations. Added code to tests.js to dumpAsText when QUnit is done.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index-expected.txt: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html: Updated to point to tests.js and Mock files in resources directory.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js.
(MockBuildbotQueue):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueueView.js: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js.
(MockBuildbotQueueView):
(MockBuildbotQueueView.prototype._latestProductiveIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js.
(MockTrac):
(MockTrac.prototype.get oldestRecordedRevisionNumber):
(MockTrac.prototype.get latestRecordedRevisionNumber):
(MockTrac.prototype.loadMoreHistoricalData):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-git-trac-rss.xml: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-trac-rss.xml: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js: Renamed from
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js.
Updated the unit tests for Trac._loaded() to point to the XML files that are now located in the 'resources' directory.
(QUnit.done): Added. Removes machine-specific output from test results and calls testRunner.notifyDone to let the layout test harness know that all testing is done.
* Scripts/run-dashboard-tests: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 Apple, 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.
- */
-
-MockBuildbotQueue = function()
-{
-    info = {
-        branches: "",
-        platform: "",
-        debug: "",
-        builder: "",
-        tester: "",
-        performance: "",
-        staticAnalyzer: "",
-        leaks: "",
-        architecture: "",
-        testCategory: "",
-        heading: "",
-        crashesOnly: ""
-    };
-    BuildbotQueue.call(this, "Mock BuildBot", "id", info);
-};
-
-BaseObject.addConstructorFunctions(MockBuildbotQueue);
-
-MockBuildbotQueue.prototype = {
-    constructor: MockBuildbotQueue,
-    __proto__: BuildbotQueue.prototype
-}

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2016 Apple, 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.
- */
-
-MockBuildbotQueueView = function(queues)
-{
-    this.element = document.createElement("div");
-    this.element.classList.add("queue-view");
-    this.element.__queueView = this;
-
-    this.queues = queues || [];
-
-    BaseObject.call(this);
-};
-
-BaseObject.addConstructorFunctions(MockBuildbotQueueView);
-
-MockBuildbotQueueView.prototype = {
-    constructor: MockBuildbotQueueView,
-    __proto__: BuildbotQueueView.prototype,
-
-    _latestProductiveIteration: function(queue)
-    {
-        return {
-            revision: {
-                "openSource": "33020"
-            }
-        };
-    }
-};

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2016 Apple, 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.
- */
-
-MockTrac = function()
-{
-    Trac.call(this, "https://trac.webkit.org/");
-};
-
-BaseObject.addConstructorFunctions(MockTrac);
-
-MockTrac.prototype = {
-    constructor: MockTrac,
-    __proto__: Trac.prototype,
-
-    get oldestRecordedRevisionNumber()
-    {
-        return "33018";
-    },
-
-    get latestRecordedRevisionNumber()
-    {
-        return "33022";
-    },
-
-    loadMoreHistoricalData: function()
-    {
-    },
-};
-
-MockTrac.EXAMPLE_TRAC_COMMITS = [
-    {
-        "revisionNumber": "33018",
-        "link": "https://trac.webkit.org/changeset/33018",
-        "title": { innerHTML: "commit message" },
-        "author": "[email protected]",
-        "date": new Date("2015-11-15T17:05:44.000Z"),
-        "description": "description",
-        "containsBranchLocation": true,
-        "branches": ["trunk"]
-    },
-    {
-        "revisionNumber": "33019",
-        "link": "https://trac.webkit.org/changeset/33019",
-        "title": { innerHTML: "commit message" },
-        "author": "[email protected]",
-        "date": new Date("2015-11-16T01:18:23.000Z"),
-        "description": "description",
-        "containsBranchLocation": true,
-        "branches": ["someOtherBranch"]
-    },
-    {
-        "revisionNumber": "33020",
-        "link": "https://trac.webkit.org/changeset/33020",
-        "title": { innerHTML: "commit message" },
-        "author": "[email protected]",
-        "date": new Date("2015-11-16T01:19:27.000Z"),
-        "description": "description",
-        "containsBranchLocation": true,
-        "branches": ["trunk"]
-    },
-    {
-        "revisionNumber": "33021",
-        "link": "https://trac.webkit.org/changeset/33021",
-        "title": { innerHTML: "commit message" },
-        "author": "[email protected]",
-        "date": new Date("2015-11-16T01:20:58.000Z"),
-        "description": "description",
-        "containsBranchLocation": true,
-        "branches": ["someOtherBranch"]
-    },
-    {
-        "revisionNumber": "33022",
-        "link": "https://trac.webkit.org/changeset/33022",
-        "title": { innerHTML: "commit message" },
-        "author": "[email protected]",
-        "date": new Date("2015-11-16T01:22:01.000Z"),
-        "description": "description",
-        "containsBranchLocation": true,
-        "branches": ["trunk"]
-    }
-];
\ No newline at end of file

Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index-expected.txt (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index-expected.txt	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index-expected.txt	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,34 @@
+WebKit Bot Watcher's Dashboard QUnit Test Runner noglobalsnotrycatch
+Hide passed tests
+Trac: _loaded (0, 8, 8)Rerun
+Trac: parse gitBranches (0, 7, 7)Rerun
+Trac: _parseRevisionFromURL (0, 3, 3)Rerun
+Trac: nextRevision (0, 2, 2)Rerun
+Trac: indexOfRevision (0, 1, 1)Rerun
+Trac: commitsOnBranchLaterThanRevision (0, 1, 1)Rerun
+Trac: commitsOnBranchLaterThanRevision no commits (0, 1, 1)Rerun
+Trac: commitsOnBranchInRevisionRange (0, 1, 1)Rerun
+BuildBotQueueView: _appendPendingRevisionCount (0, 1, 1)Rerun
+BuildBotQueueView: _popoverLinesForCommitRange (0, 1, 1)Rerun
+BuildBotQueueView: _presentPopoverForPendingCommits (0, 1, 1)Rerun
+BuildBotQueueView: _presentPopoverForPendingCommits no pending commits (0, 1, 1)Rerun
+BuildBotQueueView: _presentPopoverForRevisionRange (0, 1, 1)Rerun
+BuildBotQueueView: _presentPopoverForRevisionRange no commits (0, 1, 1)Rerun
+BuildBotQueueView: _revisionContentWithPopoverForIteration (0, 3, 3)Rerun
+BuildBotQueueView: _revisionContentWithPopoverForIteration has previousIteration (0, 4, 4)Rerun
+BuildBotQueueView: _formatRevisionForDisplay Subversion (0, 1, 1)Rerun
+BuildBotQueueView: _formatRevisionForDisplay Git (0, 1, 1)Rerun
+BuildBotQueue: compareIterations by revisions (0, 3, 3)Rerun
+BuildBotQueue: compareIterations by loaded (one revision missing) (0, 2, 2)Rerun
+BuildBotQueue: compareIterations by loaded (same revision) (0, 2, 2)Rerun
+BuildBotQueue: compareIterations by id (revisions not specified) (0, 3, 3)Rerun
+BuildBotQueue: compareIterations by id (same revision) (0, 3, 3)Rerun
+BuildBotQueue: compareIterationsByRevisions (0, 3, 3)Rerun
[email protected] message
+commits since previous result
[email protected] message
[email protected] message
+no commits to trunk since previous result
+commits since previous result
[email protected] message
[email protected] message

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html	2016-04-07 21:08:40 UTC (rev 199180)
@@ -62,10 +62,10 @@
     <script src=""
     <script src=""
     <script src=""
-    <script src=""
-    <script src=""
-    <script src=""
-    <script src=""
+    <script src=""
+    <script src=""
+    <script src=""
+    <script src=""
 
 </head>
 <body>

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 Apple, 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.
+ */
+
+MockBuildbotQueue = function()
+{
+    info = {
+        branches: "",
+        platform: "",
+        debug: "",
+        builder: "",
+        tester: "",
+        performance: "",
+        staticAnalyzer: "",
+        leaks: "",
+        architecture: "",
+        testCategory: "",
+        heading: "",
+        crashesOnly: ""
+    };
+    BuildbotQueue.call(this, "Mock BuildBot", "id", info);
+};
+
+BaseObject.addConstructorFunctions(MockBuildbotQueue);
+
+MockBuildbotQueue.prototype = {
+    constructor: MockBuildbotQueue,
+    __proto__: BuildbotQueue.prototype
+}

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueueView.js (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueueView.js	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueueView.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 Apple, 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.
+ */
+
+MockBuildbotQueueView = function(queues)
+{
+    this.element = document.createElement("div");
+    this.element.classList.add("queue-view");
+    this.element.__queueView = this;
+
+    this.queues = queues || [];
+
+    BaseObject.call(this);
+};
+
+BaseObject.addConstructorFunctions(MockBuildbotQueueView);
+
+MockBuildbotQueueView.prototype = {
+    constructor: MockBuildbotQueueView,
+    __proto__: BuildbotQueueView.prototype,
+
+    _latestProductiveIteration: function(queue)
+    {
+        return {
+            revision: {
+                "openSource": "33020"
+            }
+        };
+    }
+};

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016 Apple, 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.
+ */
+
+MockTrac = function()
+{
+    Trac.call(this, "https://trac.webkit.org/");
+};
+
+BaseObject.addConstructorFunctions(MockTrac);
+
+MockTrac.prototype = {
+    constructor: MockTrac,
+    __proto__: Trac.prototype,
+
+    get oldestRecordedRevisionNumber()
+    {
+        return "33018";
+    },
+
+    get latestRecordedRevisionNumber()
+    {
+        return "33022";
+    },
+
+    loadMoreHistoricalData: function()
+    {
+    },
+};
+
+MockTrac.EXAMPLE_TRAC_COMMITS = [
+    {
+        "revisionNumber": "33018",
+        "link": "https://trac.webkit.org/changeset/33018",
+        "title": { innerHTML: "commit message" },
+        "author": "[email protected]",
+        "date": new Date("2015-11-15T17:05:44.000Z"),
+        "description": "description",
+        "containsBranchLocation": true,
+        "branches": ["trunk"]
+    },
+    {
+        "revisionNumber": "33019",
+        "link": "https://trac.webkit.org/changeset/33019",
+        "title": { innerHTML: "commit message" },
+        "author": "[email protected]",
+        "date": new Date("2015-11-16T01:18:23.000Z"),
+        "description": "description",
+        "containsBranchLocation": true,
+        "branches": ["someOtherBranch"]
+    },
+    {
+        "revisionNumber": "33020",
+        "link": "https://trac.webkit.org/changeset/33020",
+        "title": { innerHTML: "commit message" },
+        "author": "[email protected]",
+        "date": new Date("2015-11-16T01:19:27.000Z"),
+        "description": "description",
+        "containsBranchLocation": true,
+        "branches": ["trunk"]
+    },
+    {
+        "revisionNumber": "33021",
+        "link": "https://trac.webkit.org/changeset/33021",
+        "title": { innerHTML: "commit message" },
+        "author": "[email protected]",
+        "date": new Date("2015-11-16T01:20:58.000Z"),
+        "description": "description",
+        "containsBranchLocation": true,
+        "branches": ["someOtherBranch"]
+    },
+    {
+        "revisionNumber": "33022",
+        "link": "https://trac.webkit.org/changeset/33022",
+        "title": { innerHTML: "commit message" },
+        "author": "[email protected]",
+        "date": new Date("2015-11-16T01:22:01.000Z"),
+        "description": "description",
+        "containsBranchLocation": true,
+        "branches": ["trunk"]
+    }
+];
\ No newline at end of file

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-git-trac-rss.xml (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-git-trac-rss.xml	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-git-trac-rss.xml	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+Copyright (C) 2016 Apple, 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.
+-->
+
+<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
+  <channel>
+    <title>WebKit</title>
+    <link>https://trac.webkit.org/timeline</link>
+    <description>Trac Timeline</description>
+    <language>en-US</language>
+    <generator>Trac 0.12.3</generator>
+    <image>
+      <title>WebKit</title>
+      <url>https://trac.webkit.org/chrome/site/favicon.png</url>
+      <link>https://trac.webkit.org/timeline</link>
+    </image>
+    <item>
+      <title>Changeset [33025]: Ita prorsus inquam Ad corpus diceres pertinere, sed ea, quae dixi</title>
+      <branches>master, someOtherBranch</branches>
+
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:48:15 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33025</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33025/1453848495332569</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item>
+    <item>
+      <title>Changeset [33024]: An eum discere ea mavis, quae cum plane perdidiceriti nihil sciat</title>
+      <branches>master</branches>
+
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:22:25 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33024</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33024/1453846945244007</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item>
+    <item>
+      <title>Changeset [33023]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</title>
+
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:22:14 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33023</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33023/1453846934034550</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item>
+   </channel>
+</rss>

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-trac-rss.xml (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-trac-rss.xml	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-trac-rss.xml	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+Copyright (C) 2016 Apple, 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.
+-->
+
+<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
+  <channel>
+    <title>WebKit</title>
+    <link>https://trac.webkit.org/timeline</link>
+    <description>Trac Timeline</description>
+    <language>en-US</language>
+    <generator>Trac 0.12.3</generator>
+    <image>
+      <title>WebKit</title>
+      <url>https://trac.webkit.org/chrome/site/favicon.png</url>
+      <link>https://trac.webkit.org/timeline</link>
+    </image>
+    <item>
+      <title>Changeset [33025]: Ita prorsus inquam Ad corpus diceres pertinere, sed ea, quae dixi</title>
+      
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:48:15 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33025</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33025/1453848495332569</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item><item>
+      <title>Changeset [33024]: An eum discere ea mavis, quae cum plane perdidiceriti nihil sciat</title>
+      
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:22:25 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33024</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33024/1453846945244007</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item><item>
+      <title>Changeset [33023]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</title>
+      
+        <author>[email protected]</author>
+
+      <pubDate>Tue, 26 Jan 2016 22:22:14 GMT</pubDate>
+      <link>https://trac.webkit.org/changeset/33023</link>
+      <guid isPermaLink="false">https://trac.webkit.org/changeset/33023/1453846934034550</guid>
+      <description>Description</description>
+      <category>changeset</category>
+    </item>
+   </channel>
+</rss>
\ No newline at end of file

Copied: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js (from rev 199179, trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js) (0 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,358 @@
+/*
+ * Copyright (C) 2016 Apple, 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.
+ */
+
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.waitUntilDone();
+}
+
+QUnit.done = function(details) {
+    if (window.testRunner) {
+        var element = document.getElementById("qunit-testresult");
+        element.parentNode.removeChild(element);
+        element = document.getElementById("qunit-userAgent");
+        element.parentNode.removeChild(element);
+        window.testRunner.notifyDone();
+    }
+};
+
+module("Trac", {
+    setup: function() {
+        this.trac = new MockTrac();
+    }
+});
+
+test("_loaded", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var client = new XMLHttpRequest();
+    client.open("GET", "resources/test-fixture-trac-rss.xml", false);
+    client._onload_ = function () {
+        this.trac._loaded(client.responseXML);
+    }.bind(this);
+    client.send();
+    var commits = this.trac.recordedCommits;
+    strictEqual(commits.length, 8, "should have 8 commits");
+    for (var i = 1; i < commits.length; i++) {
+        var firstRevision = commits[i - 1].revisionNumber;
+        var secondRevision = commits[i].revisionNumber;
+        strictEqual(secondRevision - firstRevision, 1, "commits should be in order " + firstRevision + ", " + secondRevision);
+    }
+});
+
+test("parse gitBranches", function()
+{
+    var client = new XMLHttpRequest();
+    client.open("GET", "resources/test-fixture-git-trac-rss.xml", false);
+    client._onload_ = function () {
+        this.trac._loaded(client.responseXML);
+    }.bind(this);
+    client.send();
+    var commits = this.trac.recordedCommits;
+    strictEqual(commits.length, 3, "should have 3 commits");
+    strictEqual(commits[0].branches.length, 0, "should have no branches");
+    strictEqual(commits[1].branches.length, 1, "should have one branch");
+    strictEqual(commits[1].branches.includes("master"), true, "should contain branch master");
+    strictEqual(commits[2].branches.length, 2, "should have two branches");
+    strictEqual(commits[2].branches.includes("master"), true, "should contain branch master");
+    strictEqual(commits[2].branches.includes("someOtherBranch"), true, "should contain branch someOtherBranch");
+});
+
+test("_parseRevisionFromURL", function()
+{
+    strictEqual(this.trac._parseRevisionFromURL("https://trac.webkit.org/changeset/190497"), "190497", "Subversion");
+    strictEqual(this.trac._parseRevisionFromURL("http://trac.foobar.com/repository/changeset/75388/project"), "75388", "Subversion with suffix");
+    strictEqual(this.trac._parseRevisionFromURL("https://git.foobar.com/trac/Whatever.git/changeset/0e498db5d8e5b5a342631"), "0e498db5d8e5b5a342631", "Git");
+});
+
+test("nextRevision", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    strictEqual(this.trac.nextRevision("trunk", "33020"), "33022", "nextRevision same branch");
+    strictEqual(this.trac.nextRevision("trunk", "33019"), "33020", "nextRevision different branch");
+});
+
+test("indexOfRevision", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    strictEqual(this.trac.indexOfRevision("33020"), 2, "indexOfRevision");
+});
+
+test("commitsOnBranchLaterThanRevision", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchLaterThanRevision("trunk", "33020");
+    equal(commits.length, 1, "greater than 33020");
+});
+
+test("commitsOnBranchLaterThanRevision no commits", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchLaterThanRevision("someOtherBranch", "33021");
+    equal(commits.length, 0, "greater than 33021");
+});
+
+test("commitsOnBranchInRevisionRange", function()
+{
+    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+    var commits = this.trac.commitsOnBranchInRevisionRange("trunk", "33020", "33022");
+    equal(commits.length, 2, "in range 33020, 33022");
+});
+
+module("BuildBotQueueView", {
+    setup: function() {
+        this.trac = new MockTrac();
+        this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+        this.queue = new MockBuildbotQueue();
+        this.trunkBranch = {
+            name: "trunk",
+            repository: {
+                name: "openSource",
+                trac: this.trac,
+                isSVN: true,
+            }
+        };
+        this.queue.branches = [this.trunkBranch];
+        this.view = new MockBuildbotQueueView([this.queue]);
+    }
+});
+
+var settings = new Settings;
+test("_appendPendingRevisionCount", function()
+{
+    this.view._appendPendingRevisionCount(this.queue);
+    var revisionsBehind = this.view.element.getElementsByClassName("message")[0].innerHTML.match(/.*(\d+) revision(|s) behind/)[1];
+    strictEqual(revisionsBehind, "1", "assert revisions behind");
+});
+
+test("_popoverLinesForCommitRange", function()
+{
+    var lines = this.view._popoverLinesForCommitRange(this.trac, this.trunkBranch, "33018", "33020");
+    strictEqual(lines.length, 2, "has 2 lines");
+});
+
+test("_presentPopoverForPendingCommits", function()
+{
+    var element = document.createElement("div");
+    var popover = new Dashboard.Popover();
+    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
+    var nodeList = popover._element.getElementsByClassName("pending-commit");
+    strictEqual(nodeList.length, 1, "has 1 pending commit");
+});
+
+test("_presentPopoverForPendingCommits no pending commits", function()
+{
+    this.someOtherBranch = {
+        name: "someOtherBranch",
+        repository: {
+            name: "openSource",
+            trac: this.trac,
+            isSVN: true,
+        }
+    };
+    this.queue.branches = [this.someOtherBranch];
+    this.view._latestProductiveIteration = function(queue)
+    {
+        var iteration = {
+            revision: { "openSource": "33021" },
+        };
+        return iteration;
+    }
+    var element = document.createElement("div");
+    var popover = new Dashboard.Popover();
+    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
+    var nodeList = popover._element.getElementsByClassName("pending-commit");
+    strictEqual(nodeList.length, 0, "has 0 pending commits");
+});
+
+test("_presentPopoverForRevisionRange", function()
+{
+    var element = document.createElement("div");
+    var popover = new Dashboard.Popover();
+    var context = {
+        trac: this.trac,
+        branch: this.trunkBranch,
+        firstRevision: "33018",
+        lastRevision: "33020"
+    };
+    this.view._presentPopoverForRevisionRange(element, popover, context);
+    var nodeList = popover._element.getElementsByClassName("pending-commit");
+    strictEqual(nodeList.length, 2, "has 2 commits");
+});
+
+test("_presentPopoverForRevisionRange no commits", function()
+{
+    var element = document.createElement("div");
+    var popover = new Dashboard.Popover();
+    var context = {
+        trac: this.trac,
+        branch: this.trunkBranch,
+        firstRevision: "33020",
+        lastRevision: "33018"
+    };
+    this.view._presentPopoverForRevisionRange(element, popover, context);
+    var nodeList = popover._element.getElementsByClassName("pending-commit");
+    strictEqual(nodeList.length, 0, "has 0 commits");
+});
+
+test("_revisionContentWithPopoverForIteration", function()
+{
+    var finished = false;
+    var iteration = new BuildbotIteration(this.queue, 1, finished);
+    iteration.revision = { "openSource": "33018" };
+    var previousIteration = null;
+    var content = this.view._revisionContentWithPopoverForIteration(iteration, previousIteration, this.trunkBranch);
+    strictEqual(content.innerHTML, "r33018", "should have correct revision number.");
+    strictEqual(content.classList.contains("revision-number"), true, "should have class 'revision-number'.");
+    strictEqual(content.classList.contains("popover-tracking"), false, "should not have class 'popover-tracking'.");
+});
+
+test("_revisionContentWithPopoverForIteration has previousIteration", function()
+{
+    var finished = false;
+    var iteration = new BuildbotIteration(this.queue, 2, finished);
+    iteration.revision = { "openSource": "33022" };
+    var previousIteration = new BuildbotIteration(this.queue, 1, finished);
+    previousIteration.revision = { "openSource": "33018" };
+    var content = this.view._revisionContentWithPopoverForIteration(iteration, previousIteration, this.trunkBranch);
+    strictEqual(content.innerHTML, "r33022", "should have correct revision number.");
+    strictEqual(content.classList.contains("revision-number"), true, "should have class 'revision-number'.");
+    strictEqual(content.classList.contains("popover-tracking"), true, "should have class 'popover-tracking'.");
+    var element = document.createElement("div");
+    var popover = new Dashboard.Popover();
+    this.view._presentPopoverForRevisionRange(element, popover, content.popoverTracker._context);
+    var nodeList = popover._element.getElementsByClassName("pending-commit");
+    strictEqual(nodeList.length, 2, "has 2 commits");
+});
+
+test("_formatRevisionForDisplay Subversion", function()
+{
+    var repository = this.trunkBranch.repository;
+    repository.isSVN = true;
+    repository.isGit = false;
+    strictEqual(this.view._formatRevisionForDisplay("33018", repository), "r33018", "Should be r33018")
+});
+
+test("_formatRevisionForDisplay Git", function()
+{
+    var repository = this.trunkBranch.repository;
+    repository.isSVN = false;
+    repository.isGit = true;
+    strictEqual(this.view._formatRevisionForDisplay("0e498db5d8e5b5a342631", repository), "0e498db", "Should be 0e498db");
+});
+
+module("BuildBotQueue", {
+    setup: function() {
+        Dashboard.Repository.OpenSource.trac = new MockTrac();
+        Dashboard.Repository.OpenSource.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
+        this.queue = new MockBuildbotQueue();
+        this.queue.branches = [{
+            name: "trunk",
+            repository: Dashboard.Repository.Opensource
+        }];
+    }
+});
+
+test("compareIterations by revisions", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = { "openSource": "33018" };
+    iteration2.revision = { "openSource": "33019" };
+    iteration1.loaded = true;
+    iteration2.loaded = true;
+    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
+    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
+    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
+});
+
+test("compareIterations by loaded (one revision missing)", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = {};
+    iteration2.revision = { "openSource": "33019" };
+    iteration1.loaded = false;
+    iteration2.loaded = true;
+    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
+    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
+});
+
+test("compareIterations by loaded (same revision)", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = { "openSource": "33019" };
+    iteration2.revision = { "openSource": "33019" };
+    iteration1.loaded = false;
+    iteration2.loaded = true;
+    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
+    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
+});
+
+test("compareIterations by id (revisions not specified)", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = {};
+    iteration2.revision = {};
+    iteration1.loaded = false;
+    iteration2.loaded = false;
+    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
+    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
+    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
+});
+
+test("compareIterations by id (same revision)", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = { "openSource": "33019" };
+    iteration2.revision = { "openSource": "33019" };
+    iteration1.loaded = false;
+    iteration2.loaded = false;
+    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
+    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
+    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
+});
+
+test("compareIterationsByRevisions", function()
+{
+    var finished = false;
+    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
+    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
+    iteration1.revision = { "openSource": "33018" };
+    iteration2.revision = { "openSource": "33019" };
+    iteration1.loaded = true;
+    iteration2.loaded = false;
+    ok(this.queue.compareIterationsByRevisions(iteration2, iteration1) < 0, "compareIterationsByRevisions: less than");
+    ok(this.queue.compareIterationsByRevisions(iteration1, iteration2) > 0, "compareIterationsByRevisions: greater than");
+    strictEqual(this.queue.compareIterationsByRevisions(iteration2, iteration2), 0, "compareIterationsByRevisions: equal");
+});
\ No newline at end of file

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Copyright (C) 2016 Apple, 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.
--->
-
-<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
-  <channel>
-    <title>WebKit</title>
-    <link>https://trac.webkit.org/timeline</link>
-    <description>Trac Timeline</description>
-    <language>en-US</language>
-    <generator>Trac 0.12.3</generator>
-    <image>
-      <title>WebKit</title>
-      <url>https://trac.webkit.org/chrome/site/favicon.png</url>
-      <link>https://trac.webkit.org/timeline</link>
-    </image>
-    <item>
-      <title>Changeset [33025]: Ita prorsus inquam Ad corpus diceres pertinere, sed ea, quae dixi</title>
-      <branches>master, someOtherBranch</branches>
-
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:48:15 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33025</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33025/1453848495332569</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item>
-    <item>
-      <title>Changeset [33024]: An eum discere ea mavis, quae cum plane perdidiceriti nihil sciat</title>
-      <branches>master</branches>
-
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:22:25 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33024</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33024/1453846945244007</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item>
-    <item>
-      <title>Changeset [33023]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</title>
-
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:22:14 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33023</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33023/1453846934034550</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item>
-   </channel>
-</rss>

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Copyright (C) 2016 Apple, 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.
--->
-
-<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
-  <channel>
-    <title>WebKit</title>
-    <link>https://trac.webkit.org/timeline</link>
-    <description>Trac Timeline</description>
-    <language>en-US</language>
-    <generator>Trac 0.12.3</generator>
-    <image>
-      <title>WebKit</title>
-      <url>https://trac.webkit.org/chrome/site/favicon.png</url>
-      <link>https://trac.webkit.org/timeline</link>
-    </image>
-    <item>
-      <title>Changeset [33025]: Ita prorsus inquam Ad corpus diceres pertinere, sed ea, quae dixi</title>
-      
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:48:15 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33025</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33025/1453848495332569</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item><item>
-      <title>Changeset [33024]: An eum discere ea mavis, quae cum plane perdidiceriti nihil sciat</title>
-      
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:22:25 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33024</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33024/1453846945244007</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item><item>
-      <title>Changeset [33023]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.</title>
-      
-        <author>[email protected]</author>
-
-      <pubDate>Tue, 26 Jan 2016 22:22:14 GMT</pubDate>
-      <link>https://trac.webkit.org/changeset/33023</link>
-      <guid isPermaLink="false">https://trac.webkit.org/changeset/33023/1453846934034550</guid>
-      <description>Description</description>
-      <category>changeset</category>
-    </item>
-   </channel>
-</rss>
\ No newline at end of file

Deleted: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js (199179 => 199180)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,343 +0,0 @@
-/*
- * Copyright (C) 2016 Apple, 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.
- */
-
-module("Trac", {
-    setup: function() {
-        this.trac = new MockTrac();
-    }
-});
-
-test("_loaded", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    var client = new XMLHttpRequest();
-    client.open('GET', 'test-fixture-trac-rss.xml', false);
-    client._onload_ = function () {
-        this.trac._loaded(client.responseXML);
-    }.bind(this);
-    client.send();
-    var commits = this.trac.recordedCommits;
-    strictEqual(commits.length, 8, "should have 8 commits");
-    for (var i = 1; i < commits.length; i++) {
-        var firstRevision = commits[i - 1].revisionNumber;
-        var secondRevision = commits[i].revisionNumber;
-        strictEqual(secondRevision - firstRevision, 1, "commits should be in order " + firstRevision + ", " + secondRevision);
-    }
-});
-
-test("parse gitBranches", function()
-{
-    var client = new XMLHttpRequest();
-    client.open("GET", "test-fixture-git-trac-rss.xml", false);
-    client._onload_ = function () {
-        this.trac._loaded(client.responseXML);
-    }.bind(this);
-    client.send();
-    var commits = this.trac.recordedCommits;
-    strictEqual(commits.length, 3, "should have 3 commits");
-    strictEqual(commits[0].branches.length, 0, "should have no branches");
-    strictEqual(commits[1].branches.length, 1, "should have one branch");
-    strictEqual(commits[1].branches.includes("master"), true, "should contain branch master");
-    strictEqual(commits[2].branches.length, 2, "should have two branches");
-    strictEqual(commits[2].branches.includes("master"), true, "should contain branch master");
-    strictEqual(commits[2].branches.includes("someOtherBranch"), true, "should contain branch someOtherBranch");
-});
-
-test("_parseRevisionFromURL", function()
-{
-    strictEqual(this.trac._parseRevisionFromURL("https://trac.webkit.org/changeset/190497"), "190497", "Subversion");
-    strictEqual(this.trac._parseRevisionFromURL("http://trac.foobar.com/repository/changeset/75388/project"), "75388", "Subversion with suffix");
-    strictEqual(this.trac._parseRevisionFromURL("https://git.foobar.com/trac/Whatever.git/changeset/0e498db5d8e5b5a342631"), "0e498db5d8e5b5a342631", "Git");
-});
-
-test("nextRevision", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    strictEqual(this.trac.nextRevision("trunk", "33020"), "33022", "nextRevision same branch");
-    strictEqual(this.trac.nextRevision("trunk", "33019"), "33020", "nextRevision different branch");
-});
-
-test("indexOfRevision", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    strictEqual(this.trac.indexOfRevision("33020"), 2, "indexOfRevision");
-});
-
-test("commitsOnBranchLaterThanRevision", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    var commits = this.trac.commitsOnBranchLaterThanRevision("trunk", "33020");
-    equal(commits.length, 1, "greater than 33020");
-});
-
-test("commitsOnBranchLaterThanRevision no commits", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    var commits = this.trac.commitsOnBranchLaterThanRevision("someOtherBranch", "33021");
-    equal(commits.length, 0, "greater than 33021");
-});
-
-test("commitsOnBranchInRevisionRange", function()
-{
-    this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-    var commits = this.trac.commitsOnBranchInRevisionRange("trunk", "33020", "33022");
-    equal(commits.length, 2, "in range 33020, 33022");
-});
-
-module("BuildBotQueueView", {
-    setup: function() {
-        this.trac = new MockTrac();
-        this.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-        this.queue = new MockBuildbotQueue();
-        this.trunkBranch = {
-            name: "trunk",
-            repository: {
-                name: "openSource",
-                trac: this.trac,
-                isSVN: true,
-            }
-        };
-        this.queue.branches = [this.trunkBranch];
-        this.view = new MockBuildbotQueueView([this.queue]);
-    }
-});
-
-var settings = new Settings;
-test("_appendPendingRevisionCount", function()
-{
-    this.view._appendPendingRevisionCount(this.queue);
-    var revisionsBehind = this.view.element.getElementsByClassName("message")[0].innerHTML.match(/.*(\d+) revision(|s) behind/)[1];
-    strictEqual(revisionsBehind, "1", "assert revisions behind");
-});
-
-test("_popoverLinesForCommitRange", function()
-{
-    var lines = this.view._popoverLinesForCommitRange(this.trac, this.trunkBranch, "33018", "33020");
-    strictEqual(lines.length, 2, "has 2 lines");
-});
-
-test("_presentPopoverForPendingCommits", function()
-{
-    var element = document.createElement("div");
-    var popover = new Dashboard.Popover();
-    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
-    var nodeList = popover._element.getElementsByClassName("pending-commit");
-    strictEqual(nodeList.length, 1, "has 1 pending commit");
-});
-
-test("_presentPopoverForPendingCommits no pending commits", function()
-{
-    this.someOtherBranch = {
-        name: "someOtherBranch",
-        repository: {
-            name: "openSource",
-            trac: this.trac,
-            isSVN: true,
-        }
-    };
-    this.queue.branches = [this.someOtherBranch];
-    this.view._latestProductiveIteration = function(queue)
-    {
-        var iteration = {
-            revision: { "openSource": "33021" },
-        };
-        return iteration;
-    }
-    var element = document.createElement("div");
-    var popover = new Dashboard.Popover();
-    this.view._presentPopoverForPendingCommits(element, popover, this.queue);
-    var nodeList = popover._element.getElementsByClassName("pending-commit");
-    strictEqual(nodeList.length, 0, "has 0 pending commits");
-});
-
-test("_presentPopoverForRevisionRange", function()
-{
-    var element = document.createElement("div");
-    var popover = new Dashboard.Popover();
-    var context = {
-        trac: this.trac,
-        branch: this.trunkBranch,
-        firstRevision: "33018",
-        lastRevision: "33020"
-    };
-    this.view._presentPopoverForRevisionRange(element, popover, context);
-    var nodeList = popover._element.getElementsByClassName("pending-commit");
-    strictEqual(nodeList.length, 2, "has 2 commits");
-});
-
-test("_presentPopoverForRevisionRange no commits", function()
-{
-    var element = document.createElement("div");
-    var popover = new Dashboard.Popover();
-    var context = {
-        trac: this.trac,
-        branch: this.trunkBranch,
-        firstRevision: "33020",
-        lastRevision: "33018"
-    };
-    this.view._presentPopoverForRevisionRange(element, popover, context);
-    var nodeList = popover._element.getElementsByClassName("pending-commit");
-    strictEqual(nodeList.length, 0, "has 0 commits");
-});
-
-test("_revisionContentWithPopoverForIteration", function()
-{
-    var finished = false;
-    var iteration = new BuildbotIteration(this.queue, 1, finished);
-    iteration.revision = { "openSource": "33018" };
-    var previousIteration = null;
-    var content = this.view._revisionContentWithPopoverForIteration(iteration, previousIteration, this.trunkBranch);
-    strictEqual(content.innerHTML, "r33018", "should have correct revision number.");
-    strictEqual(content.classList.contains("revision-number"), true, "should have class 'revision-number'.");
-    strictEqual(content.classList.contains("popover-tracking"), false, "should not have class 'popover-tracking'.");
-});
-
-test("_revisionContentWithPopoverForIteration has previousIteration", function()
-{
-    var finished = false;
-    var iteration = new BuildbotIteration(this.queue, 2, finished);
-    iteration.revision = { "openSource": "33022" };
-    var previousIteration = new BuildbotIteration(this.queue, 1, finished);
-    previousIteration.revision = { "openSource": "33018" };
-    var content = this.view._revisionContentWithPopoverForIteration(iteration, previousIteration, this.trunkBranch);
-    strictEqual(content.innerHTML, "r33022", "should have correct revision number.");
-    strictEqual(content.classList.contains("revision-number"), true, "should have class 'revision-number'.");
-    strictEqual(content.classList.contains("popover-tracking"), true, "should have class 'popover-tracking'.");
-    var element = document.createElement("div");
-    var popover = new Dashboard.Popover();
-    this.view._presentPopoverForRevisionRange(element, popover, content.popoverTracker._context);
-    var nodeList = popover._element.getElementsByClassName("pending-commit");
-    strictEqual(nodeList.length, 2, "has 2 commits");
-});
-
-test("_formatRevisionForDisplay Subversion", function()
-{
-    var repository = this.trunkBranch.repository;
-    repository.isSVN = true;
-    repository.isGit = false;
-    strictEqual(this.view._formatRevisionForDisplay("33018", repository), "r33018", "Should be r33018")
-});
-
-test("_formatRevisionForDisplay Git", function()
-{
-    var repository = this.trunkBranch.repository;
-    repository.isSVN = false;
-    repository.isGit = true;
-    strictEqual(this.view._formatRevisionForDisplay("0e498db5d8e5b5a342631", repository), "0e498db", "Should be 0e498db");
-});
-
-module("BuildBotQueue", {
-    setup: function() {
-        Dashboard.Repository.OpenSource.trac = new MockTrac();
-        Dashboard.Repository.OpenSource.trac.recordedCommits = MockTrac.EXAMPLE_TRAC_COMMITS;
-        this.queue = new MockBuildbotQueue();
-        this.queue.branches = [{
-            name: "trunk",
-            repository: Dashboard.Repository.Opensource
-        }];
-    }
-});
-
-test("compareIterations by revisions", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = { "openSource": "33018" };
-    iteration2.revision = { "openSource": "33019" };
-    iteration1.loaded = true;
-    iteration2.loaded = true;
-    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
-    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
-    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
-});
-
-test("compareIterations by loaded (one revision missing)", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = {};
-    iteration2.revision = { "openSource": "33019" };
-    iteration1.loaded = false;
-    iteration2.loaded = true;
-    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
-    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
-});
-
-test("compareIterations by loaded (same revision)", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = { "openSource": "33019" };
-    iteration2.revision = { "openSource": "33019" };
-    iteration1.loaded = false;
-    iteration2.loaded = true;
-    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
-    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
-});
-
-test("compareIterations by id (revisions not specified)", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = {};
-    iteration2.revision = {};
-    iteration1.loaded = false;
-    iteration2.loaded = false;
-    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
-    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
-    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
-});
-
-test("compareIterations by id (same revision)", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = { "openSource": "33019" };
-    iteration2.revision = { "openSource": "33019" };
-    iteration1.loaded = false;
-    iteration2.loaded = false;
-    ok(this.queue.compareIterations(iteration2, iteration1) < 0, "compareIterations: less than");
-    ok(this.queue.compareIterations(iteration1, iteration2) > 0, "compareIterations: greater than");
-    strictEqual(this.queue.compareIterations(iteration2, iteration2), 0, "compareIterations: equal");
-});
-
-test("compareIterationsByRevisions", function()
-{
-    var finished = false;
-    var iteration1 = new BuildbotIteration(this.queue, 1, finished);
-    var iteration2 = new BuildbotIteration(this.queue, 2, finished);
-    iteration1.revision = { "openSource": "33018" };
-    iteration2.revision = { "openSource": "33019" };
-    iteration1.loaded = true;
-    iteration2.loaded = false;
-    ok(this.queue.compareIterationsByRevisions(iteration2, iteration1) < 0, "compareIterationsByRevisions: less than");
-    ok(this.queue.compareIterationsByRevisions(iteration1, iteration2) > 0, "compareIterationsByRevisions: greater than");
-    strictEqual(this.queue.compareIterationsByRevisions(iteration2, iteration2), 0, "compareIterationsByRevisions: equal");
-});
\ No newline at end of file

Modified: trunk/Tools/ChangeLog (199179 => 199180)


--- trunk/Tools/ChangeLog	2016-04-07 21:01:42 UTC (rev 199179)
+++ trunk/Tools/ChangeLog	2016-04-07 21:08:40 UTC (rev 199180)
@@ -1,3 +1,38 @@
+2016-04-07  Jason Marcell  <[email protected]>
+
+        Adding layout tests for the bot watcher's dashboard QUnit tests.
+        https://bugs.webkit.org/show_bug.cgi?id=155272
+
+        Reviewed by Daniel Bates.
+
+        Moved supporting resources into a resources folder and updated index.html accordingly
+        to point to the new locations. Added code to tests.js to dumpAsText when QUnit is done.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index-expected.txt: Added.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html: Updated to point to tests.js and Mock files in resources directory.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueue.js: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js.
+        (MockBuildbotQueue):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbotQueueView.js: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js.
+        (MockBuildbotQueueView):
+        (MockBuildbotQueueView.prototype._latestProductiveIteration):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockTrac.js: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js.
+        (MockTrac):
+        (MockTrac.prototype.get oldestRecordedRevisionNumber):
+        (MockTrac.prototype.get latestRecordedRevisionNumber):
+        (MockTrac.prototype.loadMoreHistoricalData):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-git-trac-rss.xml: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-git-trac-rss.xml.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/test-fixture-trac-rss.xml: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/test-fixture-trac-rss.xml.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/tests.js: Renamed from
+        Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js.
+        Updated the unit tests for Trac._loaded() to point to the XML files that are now located in the 'resources' directory.
+        (QUnit.done): Added. Removes machine-specific output from test results and calls testRunner.notifyDone to let the layout test harness know that all testing is done.
+        * Scripts/run-dashboard-tests: Added.
+
 2016-04-06  ChangSeok Oh  <[email protected]>
 
         Unreviewed, Update my primary email address and expertise.

Added: trunk/Tools/Scripts/run-dashboard-tests (0 => 199180)


--- trunk/Tools/Scripts/run-dashboard-tests	                        (rev 0)
+++ trunk/Tools/Scripts/run-dashboard-tests	2016-04-07 21:08:40 UTC (rev 199180)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Copyright (C) 2016 Apple 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. ``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
+# 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.
+
+TOOLS_DIRECTORY="$(dirname $0)"
+RUN_WEBKIT_TESTS="$TOOLS_DIRECTORY/run-webkit-tests"
+TEST_DIRECTORY="$TOOLS_DIRECTORY/../BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests"
+
+$RUN_WEBKIT_TESTS --layout-tests-directory=$TEST_DIRECTORY "$@"
Property changes on: trunk/Tools/Scripts/run-dashboard-tests
___________________________________________________________________

Added: svn:executable

_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to