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

Files app: Rename opts to options

BUG=None
TEST=out/release/browser_tests --gtest_filter="*FilesApp*" --gtest_list_tests
TEST=testing/xvfb.py out/release/browser_tests --gtest_filter="*FilesApp*" --test-launcher-jobs=10

Change-Id: Id60e003aa889f6f1886f2c1332e50fb5f6080b65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210041Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: François Degros <fdegros@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771017}
parent bc6df424
...@@ -31,73 +31,73 @@ struct TestCase { ...@@ -31,73 +31,73 @@ struct TestCase {
} }
TestCase& InGuestMode() { TestCase& InGuestMode() {
opts.guest_mode = IN_GUEST_MODE; options.guest_mode = IN_GUEST_MODE;
return *this; return *this;
} }
TestCase& InIncognito() { TestCase& InIncognito() {
opts.guest_mode = IN_INCOGNITO; options.guest_mode = IN_INCOGNITO;
return *this; return *this;
} }
TestCase& TabletMode() { TestCase& TabletMode() {
opts.tablet_mode = true; options.tablet_mode = true;
return *this; return *this;
} }
TestCase& EnableDocumentsProvider() { TestCase& EnableDocumentsProvider() {
opts.arc = true; options.arc = true;
opts.documents_provider = true; options.documents_provider = true;
return *this; return *this;
} }
TestCase& DisableDocumentsProvider() { TestCase& DisableDocumentsProvider() {
opts.documents_provider = false; options.documents_provider = false;
return *this; return *this;
} }
TestCase& EnableArc() { TestCase& EnableArc() {
opts.arc = true; options.arc = true;
return *this; return *this;
} }
TestCase& Offline() { TestCase& Offline() {
opts.offline = true; options.offline = true;
return *this; return *this;
} }
TestCase& FilesNg() { TestCase& FilesNg() {
opts.files_ng = true; options.files_ng = true;
return *this; return *this;
} }
TestCase& DisableFilesNg() { TestCase& DisableFilesNg() {
opts.files_ng = false; options.files_ng = false;
return *this; return *this;
} }
TestCase& DisableNativeSmb() { TestCase& DisableNativeSmb() {
opts.native_smb = false; options.native_smb = false;
return *this; return *this;
} }
TestCase& EnableSmbfs() { TestCase& EnableSmbfs() {
opts.smbfs = true; options.smbfs = true;
return *this; return *this;
} }
TestCase& EnableUnifiedMediaView() { TestCase& EnableUnifiedMediaView() {
opts.unified_media_view = true; options.unified_media_view = true;
return *this; return *this;
} }
TestCase& DontMountVolumes() { TestCase& DontMountVolumes() {
opts.mount_volumes = false; options.mount_volumes = false;
return *this; return *this;
} }
TestCase& DontObserveFileTasks() { TestCase& DontObserveFileTasks() {
opts.observe_file_tasks = false; options.observe_file_tasks = false;
return *this; return *this;
} }
...@@ -108,54 +108,54 @@ struct TestCase { ...@@ -108,54 +108,54 @@ struct TestCase {
// active browser in this case, which requires a Browser to be present. See // active browser in this case, which requires a Browser to be present. See
// https://crbug.com/736930. // https://crbug.com/736930.
TestCase& WithBrowser() { TestCase& WithBrowser() {
opts.browser = true; options.browser = true;
return *this; return *this;
} }
TestCase& ZipNoNaCl() { TestCase& ZipNoNaCl() {
opts.zip_no_nacl = true; options.zip_no_nacl = true;
return *this; return *this;
} }
std::string GetFullName() const { std::string GetFullName() const {
std::string full_name = name; std::string full_name = name;
if (opts.guest_mode == IN_GUEST_MODE) if (options.guest_mode == IN_GUEST_MODE)
full_name += "_GuestMode"; full_name += "_GuestMode";
if (opts.guest_mode == IN_INCOGNITO) if (options.guest_mode == IN_INCOGNITO)
full_name += "_Incognito"; full_name += "_Incognito";
if (opts.tablet_mode) if (options.tablet_mode)
full_name += "_TabletMode"; full_name += "_TabletMode";
if (!opts.files_ng) if (!options.files_ng)
full_name += "_DisableFilesNg"; full_name += "_DisableFilesNg";
if (!opts.native_smb) if (!options.native_smb)
full_name += "_DisableNativeSmb"; full_name += "_DisableNativeSmb";
if (opts.documents_provider) if (options.documents_provider)
full_name += "_DocumentsProvider"; full_name += "_DocumentsProvider";
if (opts.zip_no_nacl) if (options.zip_no_nacl)
full_name += "_ZipNoNaCl"; full_name += "_ZipNoNaCl";
return full_name; return full_name;
} }
const char* const name; const char* const name;
FileManagerBrowserTestBase::Options opts; FileManagerBrowserTestBase::Options options;
}; };
std::ostream& operator<<(std::ostream& out, const TestCase& test_case) { std::ostream& operator<<(std::ostream& out, const TestCase& test_case) {
return out << test_case.opts; return out << test_case.options;
} }
// FilesAppBrowserTest with zip/unzip support. // FilesAppBrowserTest with zip/unzip support.
TestCase ZipCase(const char* const name) { TestCase ZipCase(const char* const name) {
TestCase test_case(name); TestCase test_case(name);
test_case.opts.zip = true; test_case.options.zip = true;
return test_case; return test_case;
} }
...@@ -186,7 +186,7 @@ class FilesAppBrowserTest : public FileManagerBrowserTestBase, ...@@ -186,7 +186,7 @@ class FilesAppBrowserTest : public FileManagerBrowserTestBase,
return "file_manager_test_manifest.json"; return "file_manager_test_manifest.json";
} }
Options GetOptions() const override { return GetParam().opts; } Options GetOptions() const override { return GetParam().options; }
private: private:
DISALLOW_COPY_AND_ASSIGN(FilesAppBrowserTest); DISALLOW_COPY_AND_ASSIGN(FilesAppBrowserTest);
......
...@@ -189,7 +189,7 @@ class FileManagerBrowserTestBase : public extensions::ExtensionApiTest { ...@@ -189,7 +189,7 @@ class FileManagerBrowserTestBase : public extensions::ExtensionApiTest {
std::ostream& operator<<(std::ostream& out, GuestMode mode); std::ostream& operator<<(std::ostream& out, GuestMode mode);
std::ostream& operator<<(std::ostream& out, std::ostream& operator<<(std::ostream& out,
const FileManagerBrowserTestBase::Options& opts); const FileManagerBrowserTestBase::Options& options);
} // namespace file_manager } // namespace file_manager
......
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