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

Side by Side Diff: chrome/test/data/webui/settings/rtl_tests.js

Issue 2465433002: Create implementation of the side panel using a dialog. (Closed)
Patch Set: nit Created 4 years 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 cr.define('settings_rtl_tests', function() { 5 cr.define('settings_rtl_tests', function() {
6 /** @implements {settings.DirectionDelegate} */ 6 /** @implements {settings.DirectionDelegate} */
7 function TestDirectionDelegate(isRtl) { 7 function TestDirectionDelegate(isRtl) {
8 /** @override */ 8 /** @override */
9 this.isRtl = function() { return isRtl; }; 9 this.isRtl = function() { return isRtl; };
10 } 10 }
11 11
12 function registerDrawerPanelTests() { 12 function registerDrawerPanelTests() {
13 suite('settings drawer panel RTL tests', function() { 13 suite('settings drawer panel RTL tests', function() {
14 test('test i18n processing flips drawer panel', function() { 14 test('test i18n processing flips drawer panel', function() {
15 var ui = document.createElement('settings-ui'); 15 var ui = document.createElement('settings-ui');
16 var appDrawer = ui.$$('app-drawer'); 16 var appDrawer = ui.$.drawer;
17 assertEquals('left', appDrawer.align); 17 assertEquals('left', appDrawer.align);
18 18
19 ui.directionDelegate = new TestDirectionDelegate(true /* isRtl */); 19 ui.directionDelegate = new TestDirectionDelegate(true /* isRtl */);
20 assertEquals('right', appDrawer.align); 20 assertEquals('right', appDrawer.align);
21 21
22 ui.directionDelegate = new TestDirectionDelegate(false /* isRtl */); 22 ui.directionDelegate = new TestDirectionDelegate(false /* isRtl */);
23 assertEquals('left', appDrawer.align); 23 assertEquals('left', appDrawer.align);
24 }); 24 });
25 }); 25 });
26 } 26 }
27 27
28 return { 28 return {
29 registerDrawerPanelTests: registerDrawerPanelTests, 29 registerDrawerPanelTests: registerDrawerPanelTests,
30 }; 30 };
31 }); 31 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698