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

Side by Side Diff: ui/file_manager/integration_tests/gallery/open_image_files.js

Issue 2046143002: Send 'key' from fake keyboard events generated by file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix additional tests I missed Created 4 years, 6 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
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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Runs a test to open a single image. 8 * Runs a test to open a single image.
9 * 9 *
10 * @param {string} testVolumeName Test volume name passed to the addEntries 10 * @param {string} testVolumeName Test volume name passed to the addEntries
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 */ 107 */
108 function openMultipleImagesAndChangeToSlideMode(testVolumeName, volumeType) { 108 function openMultipleImagesAndChangeToSlideMode(testVolumeName, volumeType) {
109 var testEntries = [ENTRIES.desktop, ENTRIES.image3]; 109 var testEntries = [ENTRIES.desktop, ENTRIES.image3];
110 var launchedPromise = launch(testVolumeName, volumeType, testEntries); 110 var launchedPromise = launch(testVolumeName, volumeType, testEntries);
111 return launchedPromise.then(function(args) { 111 return launchedPromise.then(function(args) {
112 var appId = args.appId; 112 var appId = args.appId;
113 return confirmTwoImagesAreLoadedInThumbnailMode(appId).then(function() { 113 return confirmTwoImagesAreLoadedInThumbnailMode(appId).then(function() {
114 // Press Enter key and mode should be changed to slide mode. 114 // Press Enter key and mode should be changed to slide mode.
115 return gallery.callRemoteTestUtil( 115 return gallery.callRemoteTestUtil(
116 'fakeKeyDown', appId, 116 'fakeKeyDown', appId,
117 [null /* active element */, 'Enter', false, false, false]); 117 [null /* active element */, 'Enter', 'Enter', false, false, false]);
118 }).then(function() { 118 }).then(function() {
119 // Wait until it changes to slide mode. 119 // Wait until it changes to slide mode.
120 return gallery.waitForElement(appId, '.gallery[mode="slide"]'); 120 return gallery.waitForElement(appId, '.gallery[mode="slide"]');
121 }); 121 });
122 }); 122 });
123 } 123 }
124 124
125 /** 125 /**
126 * The openSingleImage test for Downloads. 126 * The openSingleImage test for Downloads.
127 * @return {Promise} Promise to be fulfilled with on success. 127 * @return {Promise} Promise to be fulfilled with on success.
(...skipping 26 matching lines...) Expand all
154 return openMultipleImages('drive', 'drive'); 154 return openMultipleImages('drive', 'drive');
155 }; 155 };
156 156
157 /** 157 /**
158 * The openMultipleImagesAndChangeToSlideMode test for Downloads. 158 * The openMultipleImagesAndChangeToSlideMode test for Downloads.
159 * @return {Promise} Promise to be fulfilled with on success. 159 * @return {Promise} Promise to be fulfilled with on success.
160 */ 160 */
161 testcase.openMultipleImagesAndChangeToSlideModeOnDownloads = function() { 161 testcase.openMultipleImagesAndChangeToSlideModeOnDownloads = function() {
162 return openMultipleImagesAndChangeToSlideMode('local', 'downloads'); 162 return openMultipleImagesAndChangeToSlideMode('local', 'downloads');
163 }; 163 };
OLDNEW
« no previous file with comments | « ui/file_manager/integration_tests/file_manager/tab_index.js ('k') | ui/file_manager/integration_tests/gallery/photo_editor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698