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

Side by Side Diff: chrome/test/data/webui/settings/android_apps_page_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 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 /** @type {?SettingsAndroidAppsPageElement} */ 5 /** @type {?SettingsAndroidAppsPageElement} */
6 var androidAppsPage = null; 6 var androidAppsPage = null;
7 7
8 /** @type {?TestAndroidAppsBrowserProxy} */ 8 /** @type {?TestAndroidAppsBrowserProxy} */
9 var androidAppsBrowserProxy = null; 9 var androidAppsBrowserProxy = null;
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 window.removeEventListener('popstate', callback); 69 window.removeEventListener('popstate', callback);
70 resolve(); 70 resolve();
71 }); 71 });
72 }); 72 });
73 } 73 }
74 74
75 setup(function() { 75 setup(function() {
76 androidAppsPage.havePlayStoreApp = true; 76 androidAppsPage.havePlayStoreApp = true;
77 androidAppsPage.prefs = {arc: {enabled: {value: true}}}; 77 androidAppsPage.prefs = {arc: {enabled: {value: true}}};
78 setAndroidAppsState(true, false); 78 setAndroidAppsState(true, false);
79 settings.navigateTo(settings.Route.ANDROID_APPS); 79 settings.navigateTo(settings.routes.ANDROID_APPS);
80 MockInteractions.tap(androidAppsPage.$$('#android-apps')); 80 MockInteractions.tap(androidAppsPage.$$('#android-apps'));
81 Polymer.dom.flush(); 81 Polymer.dom.flush();
82 subpage = androidAppsPage.$$('settings-android-apps-subpage'); 82 subpage = androidAppsPage.$$('settings-android-apps-subpage');
83 assertTrue(!!subpage); 83 assertTrue(!!subpage);
84 }); 84 });
85 85
86 test('Sanity', function() { 86 test('Sanity', function() {
87 assertTrue(!!subpage.$$('#remove')); 87 assertTrue(!!subpage.$$('#remove'));
88 assertTrue(!subpage.$$('settings-android-settings-element')); 88 assertTrue(!subpage.$$('settings-android-settings-element'));
89 }); 89 });
(...skipping 29 matching lines...) Expand all
119 var remove = subpage.$$('#remove'); 119 var remove = subpage.$$('#remove');
120 assertTrue(!!remove); 120 assertTrue(!!remove);
121 121
122 subpage.onRemoveTap_(); 122 subpage.onRemoveTap_();
123 Polymer.dom.flush(); 123 Polymer.dom.flush();
124 assertTrue(dialog.open); 124 assertTrue(dialog.open);
125 dialog.close(); 125 dialog.close();
126 }); 126 });
127 127
128 test('HideOnDisable', function() { 128 test('HideOnDisable', function() {
129 assertEquals(settings.getCurrentRoute(), 129 assertEquals(
130 settings.Route.ANDROID_APPS_DETAILS); 130 settings.getCurrentRoute(), settings.routes.ANDROID_APPS_DETAILS);
131 setAndroidAppsState(false, false); 131 setAndroidAppsState(false, false);
132 return whenPopState().then(function() { 132 return whenPopState().then(function() {
133 assertEquals(settings.getCurrentRoute(), 133 assertEquals(settings.getCurrentRoute(), settings.routes.ANDROID_APPS);
134 settings.Route.ANDROID_APPS);
135 }); 134 });
136 }); 135 });
137 }); 136 });
138 137
139 suite('Enforced', function() { 138 suite('Enforced', function() {
140 var subpage; 139 var subpage;
141 140
142 setup(function() { 141 setup(function() {
143 androidAppsPage.havePlayStoreApp = true; 142 androidAppsPage.havePlayStoreApp = true;
144 androidAppsPage.prefs = { 143 androidAppsPage.prefs = {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 var promise = androidAppsBrowserProxy.whenCalled( 184 var promise = androidAppsBrowserProxy.whenCalled(
186 'showAndroidAppsSettings'); 185 'showAndroidAppsSettings');
187 // MockInteractions.tap does not work here due style is not updated. 186 // MockInteractions.tap does not work here due style is not updated.
188 button.click(); 187 button.click();
189 Polymer.dom.flush(); 188 Polymer.dom.flush();
190 return promise; 189 return promise;
191 }); 190 });
192 }); 191 });
193 192
194 }); 193 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/about_page_tests.js ('k') | chrome/test/data/webui/settings/basic_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698