Commit 0de412b9 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Add closure to integration tests 4 of 4

Bug: 1064504
Change-Id: I25aa5a0d12c1a13f1b7c4e3a816e8ce34c1d2e9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248387
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779668}
parent a57b8da1
...@@ -40,6 +40,14 @@ js_type_check("closure_compile") { ...@@ -40,6 +40,14 @@ js_type_check("closure_compile") {
":restore_prefs", ":restore_prefs",
":search", ":search",
":share_and_manage_dialog", ":share_and_manage_dialog",
":sort_columns",
":suggest_app_dialog",
":tab_index",
":tasks",
":toolbar",
":transfer",
":traverse",
":zip_files",
] ]
} }
...@@ -216,3 +224,43 @@ js_library("share_and_manage_dialog") { ...@@ -216,3 +224,43 @@ js_library("share_and_manage_dialog") {
testonly = true testonly = true
deps = [] deps = []
} }
js_library("sort_columns") {
testonly = true
deps = []
}
js_library("suggest_app_dialog") {
testonly = true
deps = []
}
js_library("tab_index") {
testonly = true
deps = []
}
js_library("tasks") {
testonly = true
deps = []
}
js_library("toolbar") {
testonly = true
deps = []
}
js_library("transfer") {
testonly = true
deps = []
}
js_library("traverse") {
testonly = true
deps = []
}
js_library("zip_files") {
testonly = true
deps = []
}
...@@ -243,7 +243,7 @@ testcase.tabindexFocusDirectorySelected = async () => { ...@@ -243,7 +243,7 @@ testcase.tabindexFocusDirectorySelected = async () => {
* @param {!Array<string>} initialElements Selectors of the elements which * @param {!Array<string>} initialElements Selectors of the elements which
* shows the Files app is ready. After all the elements show up, the * shows the Files app is ready. After all the elements show up, the
* tabfocus tests starts. * tabfocus tests starts.
* @param {Array<string>} expectedTabOrder Array with the IDs of the element * @param {!Array<string>} expectedTabOrder Array with the IDs of the element
* with the corresponding order of expected tab-indexes. * with the corresponding order of expected tab-indexes.
*/ */
async function tabindexFocus( async function tabindexFocus(
......
...@@ -11,16 +11,16 @@ class FakeTask { ...@@ -11,16 +11,16 @@ class FakeTask {
/** /**
* @param {boolean} isDefault Whether the task is default or not. * @param {boolean} isDefault Whether the task is default or not.
* @param {string} taskId Task ID. * @param {string} taskId Task ID.
* @param {string} title Title of the task. * @param {string=} opt_title Title of the task.
* @param {boolean=} opt_isGenericFileHandler Whether the task is a generic * @param {boolean=} opt_isGenericFileHandler Whether the task is a generic
* file handler. * file handler.
*/ */
constructor(isDefault, taskId, title, opt_isGenericFileHandler) { constructor(isDefault, taskId, opt_title, opt_isGenericFileHandler) {
this.driveApp = false; this.driveApp = false;
this.iconUrl = 'chrome://theme/IDR_DEFAULT_FAVICON'; // Dummy icon this.iconUrl = 'chrome://theme/IDR_DEFAULT_FAVICON'; // Dummy icon
this.isDefault = isDefault; this.isDefault = isDefault;
this.taskId = taskId; this.taskId = taskId;
this.title = title; this.title = opt_title;
this.isGenericFileHandler = opt_isGenericFileHandler || false; this.isGenericFileHandler = opt_isGenericFileHandler || false;
Object.freeze(this); Object.freeze(this);
} }
...@@ -158,7 +158,7 @@ async function defaultTaskDialog(appId, expectedTaskId) { ...@@ -158,7 +158,7 @@ async function defaultTaskDialog(appId, expectedTaskId) {
])); ]));
// Wait for the dialog hidden, and the task is executed. // Wait for the dialog hidden, and the task is executed.
await remoteCall.waitForElementLost(appId, '#default-task-dialog', null); await remoteCall.waitForElementLost(appId, '#default-task-dialog');
// Execute the new default task. Click on "Open ▼" button. // Execute the new default task. Click on "Open ▼" button.
remoteCall.callRemoteTestUtil('fakeMouseClick', appId, ['#tasks']); remoteCall.callRemoteTestUtil('fakeMouseClick', appId, ['#tasks']);
......
...@@ -229,9 +229,9 @@ async function transferBetweenVolumes(transferInfo) { ...@@ -229,9 +229,9 @@ async function transferBetweenVolumes(transferInfo) {
/** /**
* A list of transfer locations, for use with transferBetweenVolumes. * A list of transfer locations, for use with transferBetweenVolumes.
* @enum{TransferLocationInfo} * @enum {TransferLocationInfo}
*/ */
const TRANSFER_LOCATIONS = Object.freeze({ const TRANSFER_LOCATIONS = {
drive: new TransferLocationInfo({ drive: new TransferLocationInfo({
breadcrumbsPath: '/My Drive', breadcrumbsPath: '/My Drive',
volumeName: 'drive', volumeName: 'drive',
...@@ -306,7 +306,8 @@ const TRANSFER_LOCATIONS = Object.freeze({ ...@@ -306,7 +306,8 @@ const TRANSFER_LOCATIONS = Object.freeze({
}), }),
] ]
}), }),
}); };
Object.freeze(TRANSFER_LOCATIONS);
/** /**
* Tests copying from Drive to Downloads. * Tests copying from Drive to Downloads.
......
...@@ -494,7 +494,7 @@ class RemoteCallFilesApp extends RemoteCall { ...@@ -494,7 +494,7 @@ class RemoteCallFilesApp extends RemoteCall {
* Waits until the given taskId appears in the executed task list. * Waits until the given taskId appears in the executed task list.
* @param {string} appId App window Id. * @param {string} appId App window Id.
* @param {string} taskId Task ID to watch. * @param {string} taskId Task ID to watch.
* @param {Array<Object>} opt_replyArgs arguments to reply to executed task. * @param {Array<Object>=} opt_replyArgs arguments to reply to executed task.
* @return {Promise} Promise to be fulfilled when the task appears in the * @return {Promise} Promise to be fulfilled when the task appears in the
* executed task list. * executed task list.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment