Commit a57b8da1 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Files app: Add closure to integration tests 3 of 4

Bug: 1064504
Change-Id: Ic985380972ba755b68226072ff3da1c29a71abab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249429
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779667}
parent 0737c281
......@@ -30,6 +30,16 @@ js_type_check("closure_compile") {
":metadata",
":metrics",
":my_files",
":open_audio_files",
":open_image_files",
":open_video_files",
":providers",
":quick_view",
":recents",
":restore_geometry",
":restore_prefs",
":search",
":share_and_manage_dialog",
]
}
......@@ -151,3 +161,58 @@ js_library("my_files") {
testonly = true
deps = []
}
js_library("open_audio_files") {
testonly = true
deps = []
}
js_library("open_image_files") {
testonly = true
deps = []
}
js_library("open_sniffed_files") {
testonly = true
deps = []
}
js_library("open_video_files") {
testonly = true
deps = []
}
js_library("providers") {
testonly = true
deps = []
}
js_library("quick_view") {
testonly = true
deps = []
}
js_library("recents") {
testonly = true
deps = []
}
js_library("restore_geometry") {
testonly = true
deps = []
}
js_library("restore_prefs") {
testonly = true
deps = []
}
js_library("search") {
testonly = true
deps = []
}
js_library("share_and_manage_dialog") {
testonly = true
deps = []
}
......@@ -9,7 +9,7 @@
* Returns the title and artist text associated with the given audio track.
*
* @param {string} audioAppId The Audio Player window ID.
* @param {query} track Query for the Audio Player track.
* @param {string} track Query for the Audio Player track.
* @return {Promise<Object>} Promise to be fulfilled with a track details
* object containing {title:string, artist:string}.
*/
......@@ -144,7 +144,7 @@
await audioPlayerApp.waitForElement(audioAppId, playFile);
// Check: track 0 should be active.
let song = await getTrackText(audioAppId, '.track[index="0"][active]');
const song = await getTrackText(audioAppId, '.track[index="0"][active]');
// Check: track 0 should have the correct title and artist.
chrome.test.assertEq('Beautiful Song', song.title);
......
......@@ -7,7 +7,6 @@
/**
* Waits until a window having the given filename appears.
* @param {string} filename Filename of the requested window.
* @param {Promise} promise Promise to be fulfilled with a found window's ID.
*/
function waitForPlaying(filename) {
const caller = getCaller();
......
......@@ -188,7 +188,7 @@
// Since there is no FSP provider, there should be no add-new-service
// sub-menu, it should instead point to CWS install-new-extension.
chrome.test.assertEq(
'#install-new-extension', element.attributes.command);
'#install-new-extension', element.attributes['command']);
return;
}
......@@ -196,7 +196,7 @@
// 'add-new-service' sub-menu does not contain the |manifest| provider.
chrome.test.assertTrue(isSmbEnabled);
chrome.test.assertEq('Add new service', element.text);
chrome.test.assertEq('#new-service', element.attributes.command);
chrome.test.assertEq('#new-service', element.attributes['command']);
chrome.test.assertEq(
'#add-new-services-menu', element.attributes['sub-menu']);
......
......@@ -169,7 +169,7 @@
* @param {string} appId Files app windowId.
* @param {string} name QuickView Metadata Box field name.
*
* @return {string} text Text value in the field name.
* @return {!Promise<string>} text Text value in the field name.
*/
async function getQuickViewMetadataBoxField(appId, name) {
let filesMetadataBox = 'files-metadata-box';
......@@ -668,7 +668,7 @@
// Get the Quick View <webview> scrollY.
const getScrollY = 'window.scrollY';
await remoteCall.callRemoteTestUtil(
const scrollY = await remoteCall.callRemoteTestUtil(
'deepExecuteScriptInWebView', appId, [webView, getScrollY]);
// Check: the initial <webview> scrollY should be 0.
......@@ -878,7 +878,7 @@
// Get the Quick View <webview> scrollY.
const getScrollY = 'window.scrollY';
await remoteCall.callRemoteTestUtil(
const scrollY = await remoteCall.callRemoteTestUtil(
'deepExecuteScriptInWebView', appId, [webView, getScrollY]);
// Check: the initial <webview> scrollY should be 0.
......@@ -2760,7 +2760,7 @@
*/
testcase.openQuickViewDeleteButtonNotShown = async () => {
// Open Files app on My Files
const appId = await openNewWindow(RootPath.MYFILES);
const appId = await openNewWindow('');
// Wait for the file list to appear.
await remoteCall.waitForElement(appId, '#file-list');
......
......@@ -437,9 +437,9 @@ class TestEntryInfo {
this.mimeType = options.mimeType || '';
this.sharedOption = options.sharedOption || SharedOption.NONE;
this.lastModifiedTime = options.lastModifiedTime;
this.nameText = options.nameText;
this.sizeText = options.sizeText;
this.typeText = options.typeText;
this.nameText = options.nameText || '';
this.sizeText = options.sizeText || '';
this.typeText = options.typeText || '';
this.capabilities = options.capabilities;
this.folderFeature = options.folderFeature;
this.pinned = !!options.pinned;
......
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