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

Side by Side Diff: ui/file_manager/gallery/js/test_util.js

Issue 1275323002: Gallery: replace paper-input of rename field with HTMLInputElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/integration_tests/remote_call.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/integration_tests/remote_call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698