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

Side by Side Diff: chrome/test/data/webui/polymer_browser_test_base.js

Issue 2375223002: md-settings: Fix back navigation from /resetProfileSettings. (Closed)
Patch Set: Fix failing test. Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Framework for running JavaScript tests of Polymer elements. 6 * @fileoverview Framework for running JavaScript tests of Polymer elements.
7 */ 7 */
8 8
9 /** 9 /**
10 * Test fixture for Polymer element testing. 10 * Test fixture for Polymer element testing.
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 */ 199 */
200 PolymerTest.getLibraries = function(basePath) { 200 PolymerTest.getLibraries = function(basePath) {
201 // Ensure basePath ends in '/'. 201 // Ensure basePath ends in '/'.
202 if (basePath.length && basePath[basePath.length - 1] != '/') 202 if (basePath.length && basePath[basePath.length - 1] != '/')
203 basePath += '/'; 203 basePath += '/';
204 204
205 return PolymerTest.prototype.extraLibraries.map(function(library) { 205 return PolymerTest.prototype.extraLibraries.map(function(library) {
206 return basePath + library; 206 return basePath + library;
207 }); 207 });
208 }; 208 };
209
210 /*
211 * Waits for queued up tasks to finish before proceeding. Inspired by:
212 * https://github.com/Polymer/web-component-tester/blob/master/browser/environme nt/helpers.js#L97
213 */
214 PolymerTest.flushTasks = function() {
215 Polymer.dom.flush();
216 // Promises have microtask timing, so we use setTimeout to explicity force a
217 // new task.
218 return new Promise(function(resolve, reject) {
219 window.setTimeout(resolve, 0);
220 });
221 };
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/test_util.js ('k') | chrome/test/data/webui/settings/reset_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698