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

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

Issue 462453002: Sheriff-O-Matic: Transition more unit tests to mocha. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and fix 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
OLDNEW
(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 oldUrlForEmbeddedFlakinessDashboard = ui.urlForEmbeddedFlakinessDashboard;
16 var reset = function() {
17 ui.urlForEmbeddedFlakinessDashboard = oldUrlForEmbeddedFlakinessDashboard;
18 }
19
20 try {
21 ui.urlForEmbeddedFlakinessDashboard = function(test, step, tree) { return "a bout:blank#" + test + step + tree; }
22 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakine ss-dashboard');
23 var testName = "foo/bar.html";
24 var step = "foo_tests";
25 var tree = "blink";
26 embeddedFlakinessDashboard.test = {
27 testName: testName,
28 step: step,
29 };
30 embeddedFlakinessDashboard.tree = tree;
31
32 requestAnimationFrame(function() {
33 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe' );
34 equal(iframe.src, ui.urlForEmbeddedFlakinessDashboard(testName, step, tree ));
35 reset();
36 start();
37 });
38 } catch (e) {
39 reset();
40 }
41 });
42
43 asyncTest("heightChanged", 1, function() {
44 var embeddedFlakinessDashboard = document.createElement('ct-embedded-flakiness -dashboard');
45
46 function finishTest() {
47 window.removeEventListener('message', finishTest);
48 var iframe = embeddedFlakinessDashboard.shadowRoot.querySelector('#iframe');
49 equal(iframe.style.height, "100px");
50 start();
51 }
52 window.addEventListener('message', finishTest);
53
54 requestAnimationFrame(function() {
55 window.postMessage({command: 'heightChanged', height: "100"}, '*');
56 });
57 });
58
59 })()
60 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-commit-tests.html ('k') | Tools/GardeningServer/ui/ct-failure-analyzer-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698