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

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

Issue 921043004: [Gallery app] Make the background page use BackgroundBase class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 10 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/manifest.json ('k') | no next file » | 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Gets file entries just under the volume. 8 * Gets file entries just under the volume.
9 * 9 *
10 * @param {VolumeManagerCommon.VolumeType} volumeType Volume type. 10 * @param {VolumeManagerCommon.VolumeType} volumeType Volume type.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 */ 112 */
113 function launchWithTestEntries( 113 function launchWithTestEntries(
114 testVolumeName, volumeType, entries, opt_selected) { 114 testVolumeName, volumeType, entries, opt_selected) {
115 var entriesPromise = addEntries([testVolumeName], entries).then(function() { 115 var entriesPromise = addEntries([testVolumeName], entries).then(function() {
116 var selectedEntries = opt_selected || entries; 116 var selectedEntries = opt_selected || entries;
117 return getFilesUnderVolume( 117 return getFilesUnderVolume(
118 volumeType, 118 volumeType,
119 selectedEntries.map(function(entry) { return entry.nameText; })); 119 selectedEntries.map(function(entry) { return entry.nameText; }));
120 }); 120 });
121 121
122 return launch(entriesPromise).then(function() { 122 return entriesPromise.then(function(entries) {
123 var launchedPromise = Promise.all([appWindowPromise, entriesPromise]); 123 return window.initializePromise.then(function() {
124 return launchedPromise.then(function(results) { 124 var urls = util.entriesToURLs(entries);
125 return {appWindow: results[0], entries: results[1]}; 125 var launchedPromise = openGalleryWindow(urls, false);
126 return launchedPromise.then(function(appWindow) {
127 return {appWindow: appWindow, entries: entries};
128 });
126 }); 129 });
127 }); 130 });
128 } 131 }
129 132
130 /** 133 /**
131 * Waits until the expected image is shown. 134 * Waits until the expected image is shown.
132 * 135 *
133 * @param {document} document Document. 136 * @param {document} document Document.
134 * @param {number} width Expected width of the image. 137 * @param {number} width Expected width of the image.
135 * @param {number} height Expected height of the image. 138 * @param {number} height Expected height of the image.
(...skipping 11 matching lines...) Expand all
147 height: fullResCanvas && fullResCanvas.height, 150 height: fullResCanvas && fullResCanvas.height,
148 name: nameBox && nameBox.value 151 name: nameBox && nameBox.value
149 }; 152 };
150 if (!chrome.test.checkDeepEq(expected, actual)) { 153 if (!chrome.test.checkDeepEq(expected, actual)) {
151 return pending('Slide mode state, expected is %j, actual is %j.', 154 return pending('Slide mode state, expected is %j, actual is %j.',
152 expected, actual); 155 expected, actual);
153 } 156 }
154 return actual; 157 return actual;
155 }); 158 });
156 } 159 }
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698