Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2127)

Unified Diff: Tools/GardeningServer/scripts/ui_unittests.js

Issue 416673003: Show non-webkit test failures in the failure stream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/scripts/ui.js ('k') | Tools/GardeningServer/ui/ct-builder-grid.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/scripts/ui_unittests.js
diff --git a/Tools/GardeningServer/scripts/treestatus.js b/Tools/GardeningServer/scripts/ui_unittests.js
similarity index 61%
copy from Tools/GardeningServer/scripts/treestatus.js
copy to Tools/GardeningServer/scripts/ui_unittests.js
index 3e7514bab125ab2fd91a878c6f7981b5703485e6..c9b361896877819022042aa77bae4a609ede05f2 100644
--- a/Tools/GardeningServer/scripts/treestatus.js
+++ b/Tools/GardeningServer/scripts/ui_unittests.js
@@ -23,26 +23,26 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-var treestatus = treestatus || {};
+(function () {
-(function() {
+module("ui");
-// FIXME: Turn this into a model-object class.
-treestatus.urlByName = function(name) {
- if (name == 'blink')
- return "http://blink-status.appspot.com/";
- if (name == 'chromium')
- return "http://chromium-status.appspot.com/";
- return null;
-}
+var flakinessBaseUrl = 'http://test-results.appspot.com/dashboards/flakiness_dashboard.html#';
-treestatus.fetchTreeStatus = function(statusURL, resultSpan) {
- return net.json(statusURL).then(function(statusJSON) {
- if (statusJSON.can_commit_freely)
- resultSpan.textContent = "OPEN";
- else
- resultSpan.textContent = statusJSON.message + " by " + statusJSON.username;
- });
-};
+test('urlForFlakinessDashboard', 4, function() {
+ equal(ui.urlForFlakinessDashboard('foo', 'bar'),
+ flakinessBaseUrl + 'tests=foo&testType=bar');
+ equal(ui.urlForFlakinessDashboard(['foo', 'baz'], 'bar'),
+ flakinessBaseUrl + 'tests=foo%2Cbaz&testType=bar');
+ equal(ui.urlForFlakinessDashboard('foo', 'webkit_tests'),
+ flakinessBaseUrl + 'tests=foo&testType=layout-tests');
+ equal(ui.urlForFlakinessDashboard('foo', 'layout-tests'),
+ flakinessBaseUrl + 'tests=foo&testType=layout-tests');
+});
+
+test('urlForEmbeddedFlakinessDashboard', 1, function() {
+ equal(ui.urlForEmbeddedFlakinessDashboard('foo', 'bar'),
+ flakinessBaseUrl + 'tests=foo&testType=bar&showChrome=false');
+});
})();
« no previous file with comments | « Tools/GardeningServer/scripts/ui.js ('k') | Tools/GardeningServer/ui/ct-builder-grid.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698