| 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 /** @fileoverview Runs the Polymer Passwords and Forms tests. */ | 5 /** @fileoverview Runs the Polymer Passwords and Forms tests. */ |
| 6 | 6 |
| 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ | 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ |
| 8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
| 9 | 9 |
| 10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 assertEquals(list, element.$$('#autofillSection').creditCards); | 245 assertEquals(list, element.$$('#autofillSection').creditCards); |
| 246 | 246 |
| 247 // The callback is coming from the manager, so the element shouldn't | 247 // The callback is coming from the manager, so the element shouldn't |
| 248 // have additional calls to the manager after the base expectations. | 248 // have additional calls to the manager after the base expectations. |
| 249 passwordManager.assertExpectations(basePasswordExpectations()); | 249 passwordManager.assertExpectations(basePasswordExpectations()); |
| 250 autofillManager.assertExpectations(baseAutofillExpectations()); | 250 autofillManager.assertExpectations(baseAutofillExpectations()); |
| 251 | 251 |
| 252 destroyPrefs(prefs); | 252 destroyPrefs(prefs); |
| 253 }); | 253 }); |
| 254 }); | 254 }); |
| 255 | |
| 256 test('testAutofillExtensionIndicator', function() { | |
| 257 return createPrefs(true, true).then(function(prefs) { | |
| 258 var element = createPasswordsAndFormsElement(prefs); | |
| 259 | |
| 260 assertFalse(!!element.$$('#autofillExtensionIndicator')); | |
| 261 element.set('prefs.autofill.enabled.extensionId', 'test-id'); | |
| 262 Polymer.dom.flush(); | |
| 263 | |
| 264 assertTrue(!!element.$$('#autofillExtensionIndicator')); | |
| 265 destroyPrefs(prefs); | |
| 266 }); | |
| 267 }); | |
| 268 | |
| 269 test('testPasswordsExtensionIndicator', function() { | |
| 270 return createPrefs(true, true).then(function(prefs) { | |
| 271 var element = createPasswordsAndFormsElement(prefs); | |
| 272 | |
| 273 assertFalse(!!element.$$('#passwordsExtensionIndicator')); | |
| 274 element.set('prefs.credentials_enable_service.extensionId', 'test-id'); | |
| 275 Polymer.dom.flush(); | |
| 276 | |
| 277 assertTrue(!!element.$$('#passwordsExtensionIndicator')); | |
| 278 destroyPrefs(prefs); | |
| 279 }); | |
| 280 }); | |
| 281 }); | 255 }); |
| 282 | 256 |
| 283 mocha.run(); | 257 mocha.run(); |
| 284 }); | 258 }); |
| OLD | NEW |