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

Side by Side Diff: chrome/test/data/webui/cr_elements/cr_elements_browsertest.js

Issue 2068713003: Refactors profile avatar selector into a Polymer element to use in md-settings & md-user-manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** @fileoverview Tests for shared Polymer elements. */ 5 /** @fileoverview Tests for shared Polymer elements. */
6 6
7 /** @const {string} Path to source root. */ 7 /** @const {string} Path to source root. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 // Polymer BrowserTest fixture. 10 // Polymer BrowserTest fixture.
11 GEN_INCLUDE( 11 GEN_INCLUDE(
12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']); 12 [ROOT_PATH + 'chrome/test/data/webui/polymer_browser_test_base.js']);
13 13
14 /** 14 /**
15 * Test fixture for shared Polymer elements. 15 * Test fixture for shared Polymer elements.
16 * @constructor 16 * @constructor
17 * @extends {PolymerTest} 17 * @extends {PolymerTest}
18 */ 18 */
19 function CrElementsBrowserTest() {} 19 function CrElementsBrowserTest() {}
20 20
21 CrElementsBrowserTest.prototype = { 21 CrElementsBrowserTest.prototype = {
22 __proto__: PolymerTest.prototype, 22 __proto__: PolymerTest.prototype,
23 23
24 /** @override */ 24 /** @override */
25 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ 25 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([
26 'cr_profile_avatar_selector_tests.js',
michaelpg 2016/06/20 17:01:10 please add a TODO(michaelpg) to split these up rat
Moe 2016/06/20 18:48:56 i'll just do it for you ;)
michaelpg 2016/06/21 00:48:09 You're awesome!
Dan Beam 2016/06/21 00:55:59 +1
26 'cr_slider_tests.js', 27 'cr_slider_tests.js',
27 'cr_toolbar_search_field_tests.js', 28 'cr_toolbar_search_field_tests.js',
28 ]), 29 ]),
29 30
30 /** 31 /**
31 * Hack: load a page underneath chrome://resources so script errors come 32 * Hack: load a page underneath chrome://resources so script errors come
32 * from the same "domain" and can be viewed. HTML imports aren't deduped with 33 * from the same "domain" and can be viewed. HTML imports aren't deduped with
33 * the current page, but it should be safe to load assert.html twice. 34 * the current page, but it should be safe to load assert.html twice.
34 * @override 35 * @override
35 */ 36 */
36 browsePreload: 'chrome://resources/html/assert.html', 37 browsePreload: 'chrome://resources/html/assert.html',
37 38
38 /** @override */ 39 /** @override */
39 setUp: function() { 40 setUp: function() {
40 PolymerTest.prototype.setUp.call(this); 41 PolymerTest.prototype.setUp.call(this);
41 // We aren't loading the main document. 42 // We aren't loading the main document.
42 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html'); 43 this.accessibilityAuditConfig.ignoreSelectors('humanLangMissing', 'html');
43 }, 44 },
44 }; 45 };
45 46
47 TEST_F('CrElementsBrowserTest', 'CrProfileAvatarSelectorTest', function() {
48 cr_profile_avatar_selector.registerTests();
49 mocha.run();
50 });
51
46 TEST_F('CrElementsBrowserTest', 'CrToolbarSearchFieldTest', function() { 52 TEST_F('CrElementsBrowserTest', 'CrToolbarSearchFieldTest', function() {
47 cr_toolbar_search_field.registerTests(); 53 cr_toolbar_search_field.registerTests();
48 mocha.run(); 54 mocha.run();
49 }); 55 });
50 56
51 TEST_F('CrElementsBrowserTest', 'CrSliderTest', function() { 57 TEST_F('CrElementsBrowserTest', 'CrSliderTest', function() {
52 cr_slider.registerTests(); 58 cr_slider.registerTests();
53 mocha.run(); 59 mocha.run();
54 }); 60 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698