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

Side by Side Diff: Tools/GardeningServer/scripts/ui_unittests.js

Issue 350563002: Port first garden-o-matic component over to polymer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add console.error Created 6 years, 6 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 onebar.select('unexpected'); 69 onebar.select('unexpected');
70 equal(window.location.hash, '#unexpected'); 70 equal(window.location.hash, '#unexpected');
71 71
72 $(onebar).detach(); 72 $(onebar).detach();
73 }); 73 });
74 74
75 // FIXME: These three results.* tests should be moved ot ui/results_unittests.js . 75 // FIXME: These three results.* tests should be moved ot ui/results_unittests.js .
76 test("results.ResultsGrid", 1, function() { 76 test("results.ResultsGrid", 1, function() {
77 var grid = new ui.results.ResultsGrid() 77 var grid = new ui.results.ResultsGrid()
78 grid.addResults([ 78 grid.addResults([
79 'http://example.com/layout-test-results/foo-bar-diff.txt', 79 'http://example.com/foo-bar-diff.txt',
80 'http://example.com/layout-test-results/foo-bar-expected.png', 80 'http://example.com/foo-bar-expected.png',
81 'http://example.com/layout-test-results/foo-bar-actual.png', 81 'http://example.com/foo-bar-actual.png',
82 'http://example.com/layout-test-results/foo-bar-diff.png', 82 'http://example.com/foo-bar-diff.png',
83 ]); 83 ]);
84 equal(grid.innerHTML, 84 equal(grid.innerHTML,
85 '<div class="comparison">' + 85 '<ct-results-comparison type="text" ' +
86 '<div>' + 86 'diffurl="http://example.com/foo-bar-diff.txt"></ct-results-comparis on>' +
87 '<h2>Expected</h2>' + 87 '<ct-results-comparison type="image" ' +
88 '<div class="results-container expected">' + 88 'actualurl="http://example.com/foo-bar-actual.png" ' +
89 '<img class="image-result" src="http://example.com/layout-te st-results/foo-bar-expected.png">' + 89 'expectedurl="http://example.com/foo-bar-expected.png" ' +
90 '</div>' + 90 'diffurl="http://example.com/foo-bar-diff.png"></ct-results-comparis on>');
91 '</div>' +
92 '<div>' +
93 '<h2>Actual</h2>' +
94 '<div class="results-container actual">' +
95 '<img class="image-result" src="http://example.com/layout-te st-results/foo-bar-actual.png">' +
96 '</div>' +
97 '</div>' +
98 '<div>' +
99 '<h2>Diff</h2>' +
100 '<div class="results-container diff">' +
101 '<img class="image-result" src="http://example.com/layout-te st-results/foo-bar-diff.png">' +
102 '</div>' +
103 '</div>' +
104 '</div>' +
105 '<div class="comparison">' +
106 '<div>' +
107 '<h2>Expected</h2>' +
108 '<div class="results-container expected"></div>' +
109 '</div>' +
110 '<div>' +
111 '<h2>Actual</h2>' +
112 '<div class="results-container actual"></div>' +
113 '</div>' +
114 '<div>' +
115 '<h2>Diff</h2>' +
116 '<div class="results-container diff">' +
117 '<iframe class="text-result" src="http://example.com/layout- test-results/foo-bar-diff.txt"></iframe>' +
118 '</div>' +
119 '</div>' +
120 '</div>');
121 }); 91 });
122 92
123 test("results.ResultsGrid (crashlog)", 1, function() { 93 test("results.ResultsGrid (crashlog)", 1, function() {
124 var grid = new ui.results.ResultsGrid() 94 var grid = new ui.results.ResultsGrid()
125 grid.addResults(['http://example.com/layout-test-results/foo-bar-crash-log.t xt']); 95 grid.addResults(['http://example.com/layout-test-results/foo-bar-crash-log.t xt']);
126 equal(grid.innerHTML, '<iframe class="text-result" src="http://example.com/l ayout-test-results/foo-bar-crash-log.txt"></iframe>'); 96 equal(grid.innerHTML, '<iframe src="http://example.com/layout-test-results/f oo-bar-crash-log.txt" '+
97 'style="border: 0px; width: 100%; height: 400px;"></iframe>');
127 }); 98 });
128 99
129 test("results.ResultsGrid (empty)", 1, function() { 100 test("results.ResultsGrid (empty)", 1, function() {
130 var grid = new ui.results.ResultsGrid() 101 var grid = new ui.results.ResultsGrid()
131 grid.addResults([]); 102 grid.addResults([]);
132 equal(grid.innerHTML, 'No results to display.'); 103 equal(grid.innerHTML, 'No results to display.');
133 }); 104 });
134 105
135 test("StatusArea", 3, function() { 106 test("StatusArea", 3, function() {
136 var statusArea = new ui.StatusArea(); 107 var statusArea = new ui.StatusArea();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 '</table>' + 364 '</table>' +
394 '</details>' + 365 '</details>' +
395 ', trunk is at <a href="http://src.chromium.org/viewvc/blink?vie w=rev&amp;revision=555">555</a>' + 366 ', trunk is at <a href="http://src.chromium.org/viewvc/blink?vie w=rev&amp;revision=555">555</a>' +
396 '<br>' + 367 '<br>' +
397 'Last roll is to <a href="http://src.chromium.org/viewvc/blink?v iew=rev&amp;revision=440">440</a><span class="critical">(115 revisions behind)</ span>, current autoroll <a href="https://codereview.chromium.org/1000">440:550</ a>'); 368 'Last roll is to <a href="http://src.chromium.org/viewvc/blink?v iew=rev&amp;revision=440">440</a><span class="critical">(115 revisions behind)</ span>, current autoroll <a href="https://codereview.chromium.org/1000">440:550</ a>');
398 start(); 369 start();
399 }); 370 });
400 }); 371 });
401 372
402 })(); 373 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698