| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 GEN_INCLUDE(['options_browsertest_base.js']); | 5 GEN_INCLUDE(['options_browsertest_base.js']); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Returns the HTML element for the |field|. | 8 * Returns the HTML element for the |field|. |
| 9 * @param {string} field The field name for the element. | 9 * @param {string} field The field name for the element. |
| 10 * @return {HTMLElement} The HTML element. | 10 * @return {HTMLElement} The HTML element. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 AutofillOptionsWebUITest.prototype = { | 34 AutofillOptionsWebUITest.prototype = { |
| 35 __proto__: OptionsBrowsertestBase.prototype, | 35 __proto__: OptionsBrowsertestBase.prototype, |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Browse to autofill options. | 38 * Browse to autofill options. |
| 39 * @override | 39 * @override |
| 40 */ | 40 */ |
| 41 browsePreload: 'chrome://settings-frame/autofill', | 41 browsePreload: 'chrome://settings-frame/autofill', |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // TODO(crbug.com/617066) Flakes on Win. |
| 45 GEN('#if defined(OS_WIN)'); |
| 46 GEN('#define MAYBE_testOpenAutofillOptions ' + |
| 47 'DISABLED_testOpenAutofillOptions'); |
| 48 GEN('#else'); |
| 49 GEN('#define MAYBE_testOpenAutofillOptions testOpenAutofillOptions'); |
| 50 GEN('#endif'); |
| 44 // Test opening the autofill options has correct location. | 51 // Test opening the autofill options has correct location. |
| 45 TEST_F('AutofillOptionsWebUITest', 'testOpenAutofillOptions', function() { | 52 TEST_F('AutofillOptionsWebUITest', 'MAYBE_testOpenAutofillOptions', |
| 53 function() { |
| 46 assertEquals(this.browsePreload, document.location.href); | 54 assertEquals(this.browsePreload, document.location.href); |
| 47 }); | 55 }); |
| 48 | 56 |
| 49 /** | 57 /** |
| 50 * TestFixture for autofill edit address overlay WebUI testing. | 58 * TestFixture for autofill edit address overlay WebUI testing. |
| 51 * @extends {testing.Test} | 59 * @extends {testing.Test} |
| 52 * @constructor | 60 * @constructor |
| 53 */ | 61 */ |
| 54 function AutofillEditAddressWebUITest() {} | 62 function AutofillEditAddressWebUITest() {} |
| 55 | 63 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 components: [[{field: 'state'}]] | 165 components: [[{field: 'state'}]] |
| 158 }); | 166 }); |
| 159 assertEquals(null, getField('city')); | 167 assertEquals(null, getField('city')); |
| 160 | 168 |
| 161 AutofillEditAddressOverlay.loadAddressComponents({ | 169 AutofillEditAddressOverlay.loadAddressComponents({ |
| 162 languageCode: 'en', | 170 languageCode: 'en', |
| 163 components: [[{field: 'city'}]] | 171 components: [[{field: 'city'}]] |
| 164 }); | 172 }); |
| 165 assertEquals('New York', getField('city').value); | 173 assertEquals('New York', getField('city').value); |
| 166 }); | 174 }); |
| OLD | NEW |