OLD | NEW |
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="ct-tree-status.html"> | 7 <link rel="import" href="ct-tree-status.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 (function () { | 10 (function () { |
(...skipping 11 matching lines...) Expand all Loading... |
22 throttledTreeStatus.status = 'throttled'; | 22 throttledTreeStatus.status = 'throttled'; |
23 throttledTreeStatus.message = 'Tree is throttled just for fun'; | 23 throttledTreeStatus.message = 'Tree is throttled just for fun'; |
24 throttledTree.status = throttledTreeStatus; | 24 throttledTree.status = throttledTreeStatus; |
25 | 25 |
26 var closedTree = document.createElement("ct-tree-status"); | 26 var closedTree = document.createElement("ct-tree-status"); |
27 var closedTreeStatus = new TreeStatus('closed-tree-project'); | 27 var closedTreeStatus = new TreeStatus('closed-tree-project'); |
28 closedTreeStatus.status = 'closed'; | 28 closedTreeStatus.status = 'closed'; |
29 closedTreeStatus.message = 'Tree is closed'; | 29 closedTreeStatus.message = 'Tree is closed'; |
30 closedTree.status = closedTreeStatus; | 30 closedTree.status = closedTreeStatus; |
31 | 31 |
32 var simulator = new NetworkSimulator(); | 32 var simulator = new NetworkSimulator(ok, start); |
33 simulator.runTest(function() { | 33 simulator.runTest(function() { |
34 requestAnimationFrame(function() { | 34 requestAnimationFrame(function() { |
35 ok(!openTree.shadowRoot.textContent.has("open-tree-project")); | 35 ok(!openTree.shadowRoot.textContent.has("open-tree-project")); |
36 ok(throttledTree.shadowRoot.textContent.has("throttled-tree-project")); | 36 ok(throttledTree.shadowRoot.textContent.has("throttled-tree-project")); |
37 ok(closedTree.shadowRoot.textContent.has("closed-tree-project")); | 37 ok(closedTree.shadowRoot.textContent.has("closed-tree-project")); |
38 equal(closedTree.shadowRoot.querySelector('a').href, closedTreeStatus.url)
; | 38 equal(closedTree.shadowRoot.querySelector('a').href, closedTreeStatus.url)
; |
39 start(); | 39 start(); |
40 }); | 40 }); |
41 }); | 41 }); |
42 }); | 42 }); |
43 | 43 |
44 })(); | 44 })(); |
45 </script> | 45 </script> |
OLD | NEW |