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-embedded-flakiness-dashboard.html"> | |
8 | |
9 <script> | |
10 (function() { | |
11 | |
12 module("ct-embedded-flakiness-dashboard"); | |
13 | |
14 asyncTest("url", 1, function() { | |
15 var failure = new CTFailure('foo_tests', 'foo/bar.html'); | |
16 var tree = "blink"; | |
17 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness
-dashboard'); | |
18 | |
19 embeddedFlakinessDashboard.test = failure; | |
20 embeddedFlakinessDashboard.tree = tree; | |
21 | |
22 requestAnimationFrame(function() { | |
23 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe'); | |
24 equal(iframe.src, failure.embeddedFlakinessDashboardURL(tree)); | |
25 start(); | |
26 }); | |
27 }); | |
28 | |
29 asyncTest("heightChanged", 1, function() { | |
30 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness
-dashboard'); | |
31 | |
32 function finishTest() { | |
33 window.removeEventListener('message', finishTest); | |
34 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe'); | |
35 equal(iframe.style.height, "100px"); | |
36 start(); | |
37 } | |
38 window.addEventListener('message', finishTest); | |
39 | |
40 requestAnimationFrame(function() { | |
41 window.postMessage({command: 'heightChanged', height: "100"}, '*'); | |
42 }); | |
43 }); | |
44 | |
45 })() | |
46 </script> | |
OLD | NEW |