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

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

Issue 1158923004: Add support to mime types in Files app UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 /** 61 /**
62 * Runs a test to open multiple images. 62 * Runs a test to open multiple images.
63 * 63 *
64 * @param {string} testVolumeName Test volume name passed to the addEntries 64 * @param {string} testVolumeName Test volume name passed to the addEntries
65 * function. Either 'drive' or 'local'. 65 * function. Either 'drive' or 'local'.
66 * @param {VolumeManagerCommon.VolumeType} volumeType Volume type. 66 * @param {VolumeManagerCommon.VolumeType} volumeType Volume type.
67 * @return {Promise} Promise to be fulfilled with on success. 67 * @return {Promise} Promise to be fulfilled with on success.
68 */ 68 */
69 function openMultipleImages(testVolumeName, volumeType) { 69 function openMultipleImages(testVolumeName, volumeType) {
70 var testEntries = [ENTRIES.desktop, ENTRIES.image2, ENTRIES.image3]; 70 var testEntries = [ENTRIES.desktop, ENTRIES.image3];
71 var launchedPromise = launch(testVolumeName, volumeType, testEntries); 71 var launchedPromise = launch(testVolumeName, volumeType, testEntries);
72 return launchedPromise.then(function(args) { 72 return launchedPromise.then(function(args) {
73 var appId = args.appId; 73 var appId = args.appId;
74 var rootElementPromise = 74 var rootElementPromise =
75 gallery.waitForElement(appId, '.gallery[mode="mosaic"]'); 75 gallery.waitForElement(appId, '.gallery[mode="mosaic"]');
76 var tilesPromise = repeatUntil(function() { 76 var tilesPromise = repeatUntil(function() {
77 return gallery.callRemoteTestUtil( 77 return gallery.callRemoteTestUtil(
78 'queryAllElements', 78 'queryAllElements',
79 appId, 79 appId,
80 ['.mosaic-tile'] 80 ['.mosaic-tile']
81 ).then(function(tiles) { 81 ).then(function(tiles) {
82 if (tiles.length !== 3) 82 if (tiles.length !== 2)
83 return pending('The number of tiles is expected 3, but is %d', 83 return pending('The number of tiles is expected 2, but is %d',
84 tiles.length); 84 tiles.length);
85 return tiles; 85 return tiles;
86 }); 86 });
87 }); 87 });
88 return Promise.all([rootElementPromise, tilesPromise]); 88 return Promise.all([rootElementPromise, tilesPromise]);
89 }); 89 });
90 } 90 }
91 91
92 /** 92 /**
93 * The openSingleImage test for Downloads. 93 * The openSingleImage test for Downloads.
(...skipping 19 matching lines...) Expand all
113 return openMultipleImages('local', 'downloads'); 113 return openMultipleImages('local', 'downloads');
114 }; 114 };
115 115
116 /** 116 /**
117 * The openMultiImages test for Google Drive. 117 * The openMultiImages test for Google Drive.
118 * @return {Promise} Promise to be fulfilled with on success. 118 * @return {Promise} Promise to be fulfilled with on success.
119 */ 119 */
120 testcase.openMultipleImagesOnDrive = function() { 120 testcase.openMultipleImagesOnDrive = function() {
121 return openMultipleImages('drive', 'drive'); 121 return openMultipleImages('drive', 'drive');
122 }; 122 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698