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

Side by Side Diff: Tools/GardeningServer/ui/test/ct-embedded-flakiness-dashboard-tests.html

Issue 479723003: Don't add extra items to sheriff-o-matic history. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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="../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 () {
11 11
12 var assert = chai.assert; 12 var assert = chai.assert;
13 13
14 describe('ct-embedded-flakiness-dashboard', function() { 14 describe('ct-embedded-flakiness-dashboard', function() {
15 it('should point the iframe to the dashboard', function(done) {
16 var failure = new CTFailure('foo_tests', 'foo/bar.html');
17 var tree = "blink";
18 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakine ss-dashboard');
19 embeddedFlakinessDashboard.test = failure;
20 embeddedFlakinessDashboard.tree = tree;
21 15
22 setTimeout(function() { 16 describe('iframe location', function() {
17 var embeddedFlakinessDashboard;
18
19 after(function() {
20 document.body.removeChild(embeddedFlakinessDashboard);
21 });
22
23 it('should point the iframe to the dashboard', function(done) {
24 var failure = new CTFailure('foo_tests', 'foo/bar.html');
25 failure.embeddedFlakinessDashboardURL = function(tree) {
26 return 'placeholder.html?' + this.flakinessDashboardURL(tree) + '&showCh rome=false';
27 }
28
29 var tree = "blink";
30 embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness -dashboard');
31 embeddedFlakinessDashboard.hidden = true;
32 embeddedFlakinessDashboard.test = failure;
33 embeddedFlakinessDashboard.tree = tree;
34 document.body.appendChild(embeddedFlakinessDashboard);
35
23 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe' ); 36 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe' );
24 assert.equal(iframe.src, failure.embeddedFlakinessDashboardURL(tree)); 37 iframe.addEventListener('load', function() {
25 done(); 38 assert.include(iframe.contentWindow.location.href,
39 failure.embeddedFlakinessDashboardURL(tree));
40 done();
41 });
26 }); 42 });
27 }); 43 });
28 44
29 it('should respond to heightChanged', function(done) { 45 it('should respond to heightChanged', function(done) {
30 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakine ss-dashboard'); 46 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakine ss-dashboard');
31 47
32 var finishTest = function() { 48 var finishTest = function() {
33 window.removeEventListener('message', finishTest); 49 window.removeEventListener('message', finishTest);
34 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe' ); 50 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe' );
35 assert.equal(iframe.style.height, '100px'); 51 assert.equal(iframe.style.height, '100px');
36 done(); 52 done();
37 }; 53 };
38 54
39 window.addEventListener('message', finishTest); 55 window.addEventListener('message', finishTest);
40 window.postMessage({command: 'heightChanged', height: "100"}, '*'); 56 window.postMessage({command: 'heightChanged', height: "100"}, '*');
41 }); 57 });
42 }); 58 });
43 59
44 })() 60 })()
45 </script> 61 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-embedded-flakiness-dashboard.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698