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-embedded-flakiness-dashboard.html"> | 7 <link rel="import" href="ct-embedded-flakiness-dashboard.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 (function() { | 10 (function() { |
(...skipping 18 matching lines...) Expand all Loading... |
29 reset(); | 29 reset(); |
30 start(); | 30 start(); |
31 }); | 31 }); |
32 } catch (e) { | 32 } catch (e) { |
33 reset(); | 33 reset(); |
34 } | 34 } |
35 }); | 35 }); |
36 | 36 |
37 asyncTest("heightChanged", 1, function() { | 37 asyncTest("heightChanged", 1, function() { |
38 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness
-dashboard'); | 38 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness
-dashboard'); |
39 window.postMessage({command: 'heightChanged', height: "100"}, '*') | |
40 | 39 |
41 requestAnimationFrame(function() { | 40 function finishTest() { |
| 41 window.removeEventListener('message', finishTest); |
42 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe'); | 42 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe'); |
43 equal(iframe.style.height, "100px"); | 43 equal(iframe.style.height, "100px"); |
44 start(); | 44 start(); |
| 45 } |
| 46 window.addEventListener('message', finishTest); |
| 47 |
| 48 requestAnimationFrame(function() { |
| 49 window.postMessage({command: 'heightChanged', height: "100"}, '*'); |
45 }); | 50 }); |
46 }); | 51 }); |
47 | 52 |
48 })() | 53 })() |
49 </script> | 54 </script> |
OLD | NEW |