Commit 874446e3 authored by François Degros's avatar François Degros Committed by Commit Bot

Files App: Remove unnecessary code in file tasks unit tests

There is no need to mock hasSwitch since it doesn't seem to be used
anymore, at least not in the code being tested.

BUG=912236
TEST=browser_tests --gtest_filter="FileManagerJsTest.FileTasks"

Change-Id: I78cba36159bc00074e18d635dc21ef64e7622d4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2206871Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: François Degros <fdegros@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770812}
parent fc3f8e13
......@@ -71,11 +71,6 @@ function setUp() {
// Mock chome APIs.
mockChrome = {
commandLinePrivate: {
hasSwitch: function(name, callback) {
callback(false);
},
},
fileManagerPrivate: {
DriveConnectionStateType: {
ONLINE: 'ONLINE',
......@@ -508,15 +503,6 @@ function testOpenWithMostRecentlyExecuted(callback) {
function testOpenZipWithZipArchiver(callback) {
const zipArchiverTaskId = 'dmboannefpncccogfdikhmhpmdnddgoe|app|open';
chrome.commandLinePrivate.hasSwitch = (name, callback) => {
if (name == 'enable-zip-archiver-unpacker') {
// This flag used to exist and was used to switch between the "Zip
// Unpacker" and "Zip Archiver" component extensions.
failWithMessage('run zip archiver', 'zip archiver flags checked');
}
callback(false);
};
window.chrome.fileManagerPrivate.getFileTasks = (entries, callback) => {
setTimeout(
callback.bind(
......
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