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

Side by Side Diff: chrome/test/data/webui/cr_elements/cr_slider_tests.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: rebase 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 Suite of tests for cr-slider. */ 5 /** @fileoverview Suite of tests for cr-slider. */
6 cr.define('cr_slider', function() { 6 cr.define('cr_slider', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('cr-slider', function() { 8 suite('cr-slider', function() {
9 /** @type {!CrSliderElement} */ 9 /** @type {!CrSliderElement} */
10 var slider; 10 var slider;
11 11
12 /** 12 /**
13 * paper-slider instance wrapped by cr-slider. 13 * paper-slider instance wrapped by cr-slider.
14 * @type {!PaperSliderElement} 14 * @type {!PaperSliderElement}
15 */ 15 */
16 var paperSlider; 16 var paperSlider;
17 17
18 var tickValues = [2, 4, 8, 16, 32, 64, 128]; 18 var tickValues = [2, 4, 8, 16, 32, 64, 128];
19 19
20 suiteSetup(function() {
21 return PolymerTest.importHtml(
22 'chrome://resources/cr_elements/cr_slider/cr_slider.html');
23 });
24
25 setup(function() { 20 setup(function() {
26 PolymerTest.clearBody(); 21 PolymerTest.clearBody();
27 slider = document.createElement('cr-slider'); 22 slider = document.createElement('cr-slider');
28 document.body.appendChild(slider); 23 document.body.appendChild(slider);
29 paperSlider = slider.$$('paper-slider'); 24 paperSlider = slider.$$('paper-slider');
30 }); 25 });
31 26
32 test('basic properties', function() { 27 test('basic properties', function() {
33 // Default properties. 28 // Default properties.
34 expectEquals(1, paperSlider.step); 29 expectEquals(1, paperSlider.step);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 testFindNearestIndex(5, 100); 111 testFindNearestIndex(5, 100);
117 testFindNearestIndex(5, 91); 112 testFindNearestIndex(5, 91);
118 }); 113 });
119 }); 114 });
120 } 115 }
121 116
122 return { 117 return {
123 registerTests: registerTests, 118 registerTests: registerTests,
124 }; 119 };
125 }); 120 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698