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

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

Issue 2957153003: MD Settings: remove unsupported routes from guest-mode. (Closed)
Patch Set: merge Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 suite('settings-animated-pages', function() { 5 suite('settings-animated-pages', function() {
6 test('focuses subpage trigger when exiting subpage', function(done) { 6 test('focuses subpage trigger when exiting subpage', function(done) {
7 document.body.innerHTML = ` 7 document.body.innerHTML = `
8 <settings-animated-pages 8 <settings-animated-pages
9 section="${settings.Route.SEARCH_ENGINES.section}"> 9 section="${settings.routes.SEARCH_ENGINES.section}">
10 <neon-animatable route-path="default"> 10 <neon-animatable route-path="default">
11 <button id="subpage-trigger"></button> 11 <button id="subpage-trigger"></button>
12 </neon-animatable> 12 </neon-animatable>
13 <neon-animatable route-path="${settings.Route.SEARCH_ENGINES.path}"> 13 <neon-animatable route-path="${settings.routes.SEARCH_ENGINES.path}">
14 <button id="subpage-trigger"></button> 14 <button id="subpage-trigger"></button>
15 </neon-animatable> 15 </neon-animatable>
16 </settings-animated-pages>`; 16 </settings-animated-pages>`;
17 17
18 var animatedPages = document.body.querySelector('settings-animated-pages'); 18 var animatedPages = document.body.querySelector('settings-animated-pages');
19 animatedPages.focusConfig = new Map(); 19 animatedPages.focusConfig = new Map();
20 animatedPages.focusConfig.set( 20 animatedPages.focusConfig.set(
21 settings.Route.SEARCH_ENGINES.path, '#subpage-trigger'); 21 settings.routes.SEARCH_ENGINES.path, '#subpage-trigger');
22 22
23 var trigger = document.body.querySelector('#subpage-trigger'); 23 var trigger = document.body.querySelector('#subpage-trigger');
24 assertTrue(!!trigger); 24 assertTrue(!!trigger);
25 trigger.addEventListener('focus', function() { done(); }); 25 trigger.addEventListener('focus', function() { done(); });
26 26
27 // Trigger subpage exit navigation. 27 // Trigger subpage exit navigation.
28 settings.navigateTo(settings.Route.BASIC); 28 settings.navigateTo(settings.routes.BASIC);
29 settings.navigateTo(settings.Route.SEARCH_ENGINES); 29 settings.navigateTo(settings.routes.SEARCH_ENGINES);
30 settings.navigateToPreviousRoute(); 30 settings.navigateToPreviousRoute();
31 }); 31 });
32 }); 32 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/route_tests.js ('k') | chrome/test/data/webui/settings/settings_main_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698