Commit 95dd79d4 authored by François Degros's avatar François Degros Committed by Commit Bot

Files app: Add support for zip-no-nacl in tests

Added tests showing that the zip-no-nacl flag has no impact on Files App
at the moment.

BUG=912236
TEST=browser_tests --gtest_filter="ZipFiles/*" --gtest_list_tests
TEST=browser_tests --gtest_filter="ZipFiles/*"

Change-Id: I40d3bc780e75b90407e07fcecc4e90f3e0aea83a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203169
Commit-Queue: François Degros <fdegros@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770860}
parent f61b33e5
......@@ -112,6 +112,11 @@ struct TestCase {
return *this;
}
TestCase& ZipNoNaCl() {
opts.zip_no_nacl = true;
return *this;
}
std::string GetFullName() const {
std::string full_name = name;
......@@ -133,6 +138,9 @@ struct TestCase {
if (opts.documents_provider)
full_name += "_DocumentsProvider";
if (opts.zip_no_nacl)
full_name += "_ZipNoNaCl";
return full_name;
}
......@@ -313,6 +321,7 @@ WRAPPED_INSTANTIATE_TEST_SUITE_P(
MAYBE_ZipFiles, /* zip_files.js */
FilesAppBrowserTest,
::testing::Values(ZipCase("zipFileOpenDownloads").InGuestMode(),
ZipCase("zipFileOpenDownloads").ZipNoNaCl(),
ZipCase("zipFileOpenDownloads"),
ZipCase("zipFileOpenDownloadsShiftJIS"),
ZipCase("zipFileOpenDownloadsMacOs"),
......@@ -321,6 +330,7 @@ WRAPPED_INSTANTIATE_TEST_SUITE_P(
ZipCase("zipFileOpenDrive"),
ZipCase("zipFileOpenUsb"),
ZipCase("zipCreateFileDownloads").InGuestMode(),
ZipCase("zipCreateFileDownloads").ZipNoNaCl(),
ZipCase("zipCreateFileDownloads"),
ZipCase("zipCreateFileDrive"),
ZipCase("zipCreateFileUsb")));
......
......@@ -714,6 +714,7 @@ std::ostream& operator<<(std::ostream& out,
PRINT_IF_NOT_DEFAULT(smbfs)
PRINT_IF_NOT_DEFAULT(tablet_mode)
PRINT_IF_NOT_DEFAULT(zip)
PRINT_IF_NOT_DEFAULT(zip_no_nacl)
#undef PRINT_IF_NOT_DEFAULT
......@@ -1564,6 +1565,12 @@ void FileManagerBrowserTestBase::SetUpCommandLine(
enabled_features.push_back(features::kSmbFs);
}
if (opts.zip_no_nacl) {
enabled_features.push_back(chromeos::features::kFilesZipNoNaCl);
} else {
disabled_features.push_back(chromeos::features::kFilesZipNoNaCl);
}
// This is destroyed in |TearDown()|. We cannot initialize this in the
// constructor due to this feature values' above dependence on virtual
// method calls, but by convention subclasses of this fixture may initialize
......
......@@ -64,6 +64,9 @@ class FileManagerBrowserTestBase : public extensions::ExtensionApiTest {
// Whether test requires zip/unzip support.
bool zip = false;
// Whether test should have zip-no-nacl active.
bool zip_no_nacl = false;
// Whether Drive should act as if offline.
bool offline = false;
......
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