| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
| 6 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 6 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 7 * @type {number} | 7 * @type {number} |
| 8 */ | 8 */ |
| 9 window.JSErrorCount = 0; | 9 window.JSErrorCount = 0; |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 chrome.test.assertTrue(element.dispatchEvent(new Event('change'))); | 58 chrome.test.assertTrue(element.dispatchEvent(new Event('change'))); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Changes the file name. | 62 * Changes the file name. |
| 63 * | 63 * |
| 64 * @param {Window} contentWindow Window to be tested. | 64 * @param {Window} contentWindow Window to be tested. |
| 65 * @param {string} newName Name to be newly assigned. | 65 * @param {string} newName Name to be newly assigned. |
| 66 */ | 66 */ |
| 67 test.util.sync.changeName = function(contentWindow, newName) { | 67 test.util.sync.changeName = function(contentWindow, newName) { |
| 68 var nameBox = contentWindow.document.querySelector( | 68 var nameBox = contentWindow.document.querySelector('.filename-spacer input'); |
| 69 '.filename-spacer > paper-input'); | 69 nameBox.focus(); |
| 70 // For paper-input, we need to focus on input element inside the component. | |
| 71 nameBox.inputElement.focus(); | |
| 72 nameBox.value = newName; | 70 nameBox.value = newName; |
| 73 nameBox.inputElement.blur(); | 71 nameBox.blur(); |
| 74 }; | 72 }; |
| 75 | 73 |
| 76 // Register the test utils. | 74 // Register the test utils. |
| 77 test.util.registerRemoteTestUtils(); | 75 test.util.registerRemoteTestUtils(); |
| OLD | NEW |