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

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

Issue 1700273003: MD Settings: make <paper-drawer-panel> flip in RTL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 cr.define('settings_rtl_tests', function() {
6 /** @implements {settings.DirectionDelegate} */
7 function TestDirectionDelegate(isRtl) {
8 /** @override */
9 this.isRtl = function() { return isRtl; };
10 }
11
12 function registerDrawerPanelTests() {
13 suite('settings drawer panel RTL tests', function() {
14 test('test i18n processing flips drawer panel', function() {
15 var ui = document.createElement('settings-ui');
16 document.body.appendChild(ui);
17 Polymer.dom.flush();
michaelpg 2016/02/17 21:14:04 not sure why the flush is necessary, does the pane
Dan Beam 2016/02/18 00:16:15 it readies ui's local DOM
Dan Beam 2016/02/18 00:16:45 er, it theory it did: actually isn't necessary (an
michaelpg 2016/02/18 00:23:18 just to be pedantic, in theory it doesn't, either:
18
19 assertFalse(ui.$.panel.rightDrawer);
20
21 ui.directionDelegate = new TestDirectionDelegate(true /* isRtl */);
22 assertTrue(ui.$.panel.rightDrawer);
23
24 ui.directionDelegate = new TestDirectionDelegate(false /* isRtl */);
25 assertFalse(ui.$.panel.rightDrawer);
26 });
27 });
28 }
29
30 return {
31 registerDrawerPanelTests: registerDrawerPanelTests,
32 };
33 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698