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

Side by Side Diff: Tools/GardeningServer/scripts/treestatus_unittests.js

Issue 398653005: Add a details link to ct-tree-status. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 26 matching lines...) Expand all
37 37
38 var closedTreeJson = { 38 var closedTreeJson = {
39 "username": "ojan@chromium.org", 39 "username": "ojan@chromium.org",
40 "date": "2013-10-14 20:32:09.642350", 40 "date": "2013-10-14 20:32:09.642350",
41 "message": "Tree is closed", 41 "message": "Tree is closed",
42 "can_commit_freely": false, 42 "can_commit_freely": false,
43 "general_state": "closed" 43 "general_state": "closed"
44 }; 44 };
45 45
46 test('urlByName', 3, function() { 46 test('urlByName', 3, function() {
47 equal(treestatus.urlByName('blink'), 'http://blink-status.appspot.com/curren t?format=json'); 47 equal(treestatus.urlByName('blink'), 'http://blink-status.appspot.com/');
48 equal(treestatus.urlByName('chromium'), 'http://chromium-status.appspot.com/ current?format=json'); 48 equal(treestatus.urlByName('chromium'), 'http://chromium-status.appspot.com/ ');
49 equal(treestatus.urlByName('foo'), null); 49 equal(treestatus.urlByName('foo'), null);
50 }); 50 });
51 51
52 asyncTest('fetchTreeStatus', 3, function() { 52 asyncTest('fetchTreeStatus', 3, function() {
53 var simulator = new NetworkSimulator(); 53 var simulator = new NetworkSimulator();
54 54
55 simulator.json = function(url) 55 simulator.json = function(url)
56 { 56 {
57 if (url.indexOf('closed') != -1) 57 if (url.indexOf('closed') != -1)
58 return Promise.resolve(closedTreeJson); 58 return Promise.resolve(closedTreeJson);
(...skipping 11 matching lines...) Expand all
70 treestatus.fetchTreeStatus('http://closedtree', span) 70 treestatus.fetchTreeStatus('http://closedtree', span)
71 .then(function() { 71 .then(function() {
72 equal(span.textContent, 'Tree is closed by ojan@chromium .org'); 72 equal(span.textContent, 'Tree is closed by ojan@chromium .org');
73 start(); 73 start();
74 }); 74 });
75 }); 75 });
76 }); 76 });
77 }); 77 });
78 78
79 })(); 79 })();
OLDNEW
« no previous file with comments | « Tools/GardeningServer/scripts/treestatus.js ('k') | Tools/GardeningServer/ui/ct-tree-status.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698