| OLD | NEW |
| 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_startup_urls_page', function() { | 5 cr.define('settings_startup_urls_page', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @implements {settings.StartupUrlsPageBrowserProxy} | 8 * @implements {settings.StartupUrlsPageBrowserProxy} |
| 9 * @extends {settings.TestBrowserProxy} | 9 * @extends {settings.TestBrowserProxy} |
| 10 */ | 10 */ |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 }); | 209 }); |
| 210 | 210 |
| 211 teardown(function() { page.remove(); }); | 211 teardown(function() { page.remove(); }); |
| 212 | 212 |
| 213 // Test that the page is requesting information from the browser. | 213 // Test that the page is requesting information from the browser. |
| 214 test('Initialization', function() { | 214 test('Initialization', function() { |
| 215 return browserProxy.whenCalled('loadStartupPages'); | 215 return browserProxy.whenCalled('loadStartupPages'); |
| 216 }); | 216 }); |
| 217 | 217 |
| 218 test('UseCurrentPages', function() { | 218 test('UseCurrentPages', function() { |
| 219 var useCurrentPagesButton = page.$$('#useCurrentPages'); | 219 var useCurrentPagesButton = page.$$('#useCurrentPages > a'); |
| 220 assertTrue(!!useCurrentPagesButton); | 220 assertTrue(!!useCurrentPagesButton); |
| 221 MockInteractions.tap(useCurrentPagesButton); | 221 MockInteractions.tap(useCurrentPagesButton); |
| 222 return browserProxy.whenCalled('useCurrentPages'); | 222 return browserProxy.whenCalled('useCurrentPages'); |
| 223 }); | 223 }); |
| 224 | 224 |
| 225 test('AddPage_OpensDialog', function() { | 225 test('AddPage_OpensDialog', function() { |
| 226 var addPageButton = page.$$('#addPage'); | 226 var addPageButton = page.$$('#addPage > a'); |
| 227 assertTrue(!!addPageButton); | 227 assertTrue(!!addPageButton); |
| 228 assertFalse(!!page.$$('settings-startup-url-dialog')); | 228 assertFalse(!!page.$$('settings-startup-url-dialog')); |
| 229 | 229 |
| 230 MockInteractions.tap(addPageButton); | 230 MockInteractions.tap(addPageButton); |
| 231 Polymer.dom.flush(); | 231 Polymer.dom.flush(); |
| 232 assertTrue(!!page.$$('settings-startup-url-dialog')); | 232 assertTrue(!!page.$$('settings-startup-url-dialog')); |
| 233 }); | 233 }); |
| 234 | 234 |
| 235 test('EditPage_OpensDialog', function() { | 235 test('EditPage_OpensDialog', function() { |
| 236 assertFalse(!!page.$$('settings-startup-url-dialog')); | 236 assertFalse(!!page.$$('settings-startup-url-dialog')); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 test('Editable', function() { | 336 test('Editable', function() { |
| 337 assertFalse(!!element.editable); | 337 assertFalse(!!element.editable); |
| 338 assertFalse(!!element.$$('#dots')); | 338 assertFalse(!!element.$$('#dots')); |
| 339 | 339 |
| 340 element.editable = true; | 340 element.editable = true; |
| 341 Polymer.dom.flush(); | 341 Polymer.dom.flush(); |
| 342 assertTrue(!!element.$$('#dots')); | 342 assertTrue(!!element.$$('#dots')); |
| 343 }); | 343 }); |
| 344 }); | 344 }); |
| 345 }); | 345 }); |
| OLD | NEW |