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

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

Issue 2727643010: InternetPageTest: flush dom after interactions (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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('Internet', function() { 5 suite('Internet', function() {
6 /** @type {InternetPageElement} */ 6 /** @type {InternetPageElement} */
7 var internetPage = null; 7 var internetPage = null;
8 8
9 /** @type {NetworkSummaryElement} */ 9 /** @type {NetworkSummaryElement} */
10 var networkSummary_ = null; 10 var networkSummary_ = null;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 test('WiFi', function() { 112 test('WiFi', function() {
113 api_.addNetworksForTest([ 113 api_.addNetworksForTest([
114 {GUID: 'wifi1_guid', Name: 'wifi1', Type: 'WiFi'}, 114 {GUID: 'wifi1_guid', Name: 'wifi1', Type: 'WiFi'},
115 {GUID: 'wifi12_guid', Name: 'wifi2', Type: 'WiFi'}, 115 {GUID: 'wifi12_guid', Name: 'wifi2', Type: 'WiFi'},
116 ]); 116 ]);
117 api_.enableNetworkType('WiFi'); 117 api_.enableNetworkType('WiFi');
118 Polymer.dom.flush(); 118 Polymer.dom.flush();
119 var wifi = networkSummary_.$$('#WiFi'); 119 var wifi = networkSummary_.$$('#WiFi');
120 assertTrue(!!wifi); 120 assertTrue(!!wifi);
121 MockInteractions.tap(wifi.$$('button.subpage-arrow')); 121 MockInteractions.tap(wifi.$$('button.subpage-arrow'));
122 Polymer.dom.flush();
122 var subpage = internetPage.$$('settings-internet-subpage'); 123 var subpage = internetPage.$$('settings-internet-subpage');
123 assertTrue(!!subpage); 124 assertTrue(!!subpage);
124 assertEquals(2, subpage.networkStateList_.length); 125 assertEquals(2, subpage.networkStateList_.length);
125 var networkList = subpage.$$('#networkList'); 126 var networkList = subpage.$$('#networkList');
126 assertTrue(!!networkList); 127 assertTrue(!!networkList);
127 assertEquals(2, networkList.networks.length); 128 assertEquals(2, networkList.networks.length);
128 }); 129 });
129 130
130 test('VPN', function() { 131 test('VPN', function() {
131 api_.addNetworksForTest([ 132 api_.addNetworksForTest([
(...skipping 25 matching lines...) Expand all
157 Type: 'ThirdPartyVPN', 158 Type: 'ThirdPartyVPN',
158 ThirdPartyVPN: {ExtensionID: 'id2', ProviderName: 'pname2'} 159 ThirdPartyVPN: {ExtensionID: 'id2', ProviderName: 'pname2'}
159 } 160 }
160 }, 161 },
161 ]); 162 ]);
162 api_.onNetworkListChanged.callListeners(); 163 api_.onNetworkListChanged.callListeners();
163 Polymer.dom.flush(); 164 Polymer.dom.flush();
164 var vpn = networkSummary_.$$('#VPN'); 165 var vpn = networkSummary_.$$('#VPN');
165 assertTrue(!!vpn); 166 assertTrue(!!vpn);
166 MockInteractions.tap(vpn.$$('button.subpage-arrow')); 167 MockInteractions.tap(vpn.$$('button.subpage-arrow'));
168 Polymer.dom.flush();
167 var subpage = internetPage.$$('settings-internet-subpage'); 169 var subpage = internetPage.$$('settings-internet-subpage');
168 assertTrue(!!subpage); 170 assertTrue(!!subpage);
169 assertEquals(2, subpage.networkStateList_.length); 171 assertEquals(2, subpage.networkStateList_.length);
170 var networkList = subpage.$$('#networkList'); 172 var networkList = subpage.$$('#networkList');
171 assertTrue(!!networkList); 173 assertTrue(!!networkList);
172 assertEquals(2, networkList.networks.length); 174 assertEquals(2, networkList.networks.length);
173 // TODO(stevenjb): Implement fake management API and test third 175 // TODO(stevenjb): Implement fake management API and test third
174 // party provider sections. 176 // party provider sections.
175 }); 177 });
176 }); 178 });
177 }); 179 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698