OLD | NEW |
| (Empty) |
1 <!-- | |
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 | |
4 found in the LICENSE file. | |
5 --> | |
6 | |
7 <link rel="import" href="ct-tree-status.html"> | |
8 | |
9 <script> | |
10 (function () { | |
11 | |
12 module("ct-tree-status"); | |
13 | |
14 asyncTest('basic', 5, function() { | |
15 var openTree = document.createElement("ct-tree-status"); | |
16 var openTreeStatus = new TreeStatus('open-tree-project'); | |
17 openTreeStatus.status = 'open'; | |
18 openTree.status = openTreeStatus; | |
19 | |
20 var throttledTree = document.createElement("ct-tree-status"); | |
21 var throttledTreeStatus = new TreeStatus('throttled-tree-project'); | |
22 throttledTreeStatus.status = 'throttled'; | |
23 throttledTreeStatus.message = 'Tree is throttled just for fun'; | |
24 throttledTree.status = throttledTreeStatus; | |
25 | |
26 var closedTree = document.createElement("ct-tree-status"); | |
27 var closedTreeStatus = new TreeStatus('closed-tree-project'); | |
28 closedTreeStatus.status = 'closed'; | |
29 closedTreeStatus.message = 'Tree is closed'; | |
30 closedTree.status = closedTreeStatus; | |
31 | |
32 var simulator = new NetworkSimulator(ok, start); | |
33 simulator.runTest(function() { | |
34 requestAnimationFrame(function() { | |
35 ok(!openTree.shadowRoot.textContent.has("open-tree-project")); | |
36 ok(throttledTree.shadowRoot.textContent.has("throttled-tree-project")); | |
37 ok(closedTree.shadowRoot.textContent.has("closed-tree-project")); | |
38 equal(closedTree.shadowRoot.querySelector('a').href, closedTreeStatus.url)
; | |
39 start(); | |
40 }); | |
41 }); | |
42 }); | |
43 | |
44 })(); | |
45 </script> | |
OLD | NEW |