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/scripts/ui/results_unittests.js

Issue 359283003: Remove usages of jquery and add sugar.js from garden-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove jquery script from ct-sheriff-o-matic Created 6 years, 5 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 test('View with reftests', 2, function() { 182 test('View with reftests', 2, function() {
183 var delegate = { 183 var delegate = {
184 fetchResultsURLs: function(failureInfo) { return Promise.resolve(); } 184 fetchResultsURLs: function(failureInfo) { return Promise.resolve(); }
185 }; 185 };
186 186
187 var view = new ui.results.View(delegate); 187 var view = new ui.results.View(delegate);
188 view.setResultsByTest(kExampleReftestResults); 188 view.setResultsByTest(kExampleReftestResults);
189 view.firstResult(); 189 view.firstResult();
190 190
191 equals($('.non-action-button', view).length, 0); 191 equals(view.querySelectorAll('.non-action-button').length, 0);
192 equals($('.action', view).length, 0); 192 equals(view.querySelectorAll('.action').length, 0);
193 }); 193 });
194 194
195 asyncTest('View of timeouts', 1, function() { 195 asyncTest('View of timeouts', 1, function() {
196 var emptyPromise = Promise.resolve([]); 196 var emptyPromise = Promise.resolve([]);
197 var delegate = { 197 var delegate = {
198 fetchResultsURLs: function(failureInfo) { return emptyPromise; } 198 fetchResultsURLs: function(failureInfo) { return emptyPromise; }
199 }; 199 };
200 200
201 var view = new ui.results.View(delegate); 201 var view = new ui.results.View(delegate);
202 view.setResultsByTest(kExampleResultsWithTimeoutByTest); 202 view.setResultsByTest(kExampleResultsWithTimeoutByTest);
203 view.firstResult(); 203 view.firstResult();
204 emptyPromise.then(function() { 204 emptyPromise.then(function() {
205 equals($('.results-grid', view).html(), 'No results to display.'); 205 equals(view.querySelector('.results-grid').innerHTML, 'No results to dis play.');
206 start(); 206 start();
207 }); 207 });
208 }); 208 });
209 209
210 })(); 210 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698