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

Side by Side Diff: Tools/GardeningServer/model/tree-status-tests.html

Issue 459463003: Convert moar Sheriff-o-Matic tests to Polymer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: forgot to add lib/network-simulator.html Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="tree-status.html"> 7 <link rel="import" href="tree-status.html">
8 8
9 <script> 9 <script>
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 var closedTreeJson = { 30 var closedTreeJson = {
31 "username": "ojan@chromium.org", 31 "username": "ojan@chromium.org",
32 "date": "2013-10-14 20:32:09.642350", 32 "date": "2013-10-14 20:32:09.642350",
33 "message": "Tree is closed", 33 "message": "Tree is closed",
34 "can_commit_freely": false, 34 "can_commit_freely": false,
35 "general_state": "closed" 35 "general_state": "closed"
36 }; 36 };
37 37
38 asyncTest("basic", 6, function() { 38 asyncTest("basic", 6, function() {
39 var simulator = new NetworkSimulator(); 39 var simulator = new NetworkSimulator(ok, start);
40 simulator.json = function(url) { 40 simulator.json = function(url) {
41 if (url.indexOf('closed') != -1) 41 if (url.indexOf('closed') != -1)
42 return Promise.resolve(closedTreeJson); 42 return Promise.resolve(closedTreeJson);
43 else if (url.indexOf('throttled') != -1) 43 else if (url.indexOf('throttled') != -1)
44 return Promise.resolve(throttledTreeJson); 44 return Promise.resolve(throttledTreeJson);
45 else 45 else
46 return Promise.resolve(openTreeJson); 46 return Promise.resolve(openTreeJson);
47 }; 47 };
48 48
49 var opentree = new TreeStatus("open-tree-project"); 49 var opentree = new TreeStatus("open-tree-project");
(...skipping 18 matching lines...) Expand all
68 ]).then(function() { 68 ]).then(function() {
69 requestAnimationFrame(function() { 69 requestAnimationFrame(function() {
70 start(); 70 start();
71 }); 71 });
72 }); 72 });
73 }); 73 });
74 }); 74 });
75 75
76 })(); 76 })();
77 </script> 77 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/lib/network-simulator.html ('k') | Tools/GardeningServer/run-unittests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698