File: file_manager_browsertest_utils.h

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (131 lines) | stat: -rw-r--r-- 3,695 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_ASH_FILE_MANAGER_FILE_MANAGER_BROWSERTEST_UTILS_H_
#define CHROME_BROWSER_ASH_FILE_MANAGER_FILE_MANAGER_BROWSERTEST_UTILS_H_

#include "chrome/browser/ash/file_manager/file_manager_browsertest_base.h"

// INSTANTIATE_TEST_SUITE_P expands to code that stringizes the arguments. Thus
// macro parameters such as |prefix| and |test_class| won't be expanded by the
// macro pre-processor. To work around this, indirect INSTANTIATE_TEST_SUITE_P,
// as WRAPPED_INSTANTIATE_TEST_SUITE_P here, so the pre-processor expands macro
// defines used to disable tests, MAYBE_prefix for example.
#ifndef WRAPPED_INSTANTIATE_TEST_SUITE_P
#define WRAPPED_INSTANTIATE_TEST_SUITE_P(prefix, test_class, generator) \
  INSTANTIATE_TEST_SUITE_P(prefix, test_class, generator,               \
                           &file_manager::test::PostTestCaseName)

#endif  // WRAPPED_INSTANTIATE_TEST_SUITE_P

namespace file_manager {
namespace test {

// Holds the testcase name and FileManagerBrowserTestBase options.
struct TestCase {
  explicit TestCase(const char* const name);

  TestCase& InGuestMode();

  TestCase& InIncognito();

  TestCase& TabletMode();

  TestCase& SetLocale(const std::string& locale);

  TestCase& SetCountry(const std::string& country);

  TestCase& EnableGenericDocumentsProvider();

  TestCase& DisableGenericDocumentsProvider();

  TestCase& EnablePhotosDocumentsProvider();

  TestCase& DisablePhotosDocumentsProvider();

  TestCase& EnableArc();

  TestCase& Offline();

  TestCase& EnableConflictDialog();

  TestCase& DisableNativeSmb();

  TestCase& FakeFileSystemProvider();

  TestCase& DontMountVolumes();

  TestCase& DontObserveFileTasks();

  TestCase& EnableSinglePartitionFormat();

  TestCase& EnableMaterializedViews();

  // Show the startup browser. Some tests invoke the file picker dialog during
  // the test. Requesting a file picker from a background page is forbidden by
  // the apps platform, and it's a bug that these tests do so.
  // FindRuntimeContext() in select_file_dialog_extension.cc will use the last
  // active browser in this case, which requires a Browser to be present. See
  // https://crbug.com/736930.
  TestCase& WithBrowser();

  TestCase& EnableDlp();

  TestCase& EnableFilesPolicyNewUX();

  TestCase& EnableDriveTrash();

  TestCase& EnableUploadOfficeToCloud();

  TestCase& EnableArcVm();

  TestCase& EnableMirrorSync();

  TestCase& EnableFileTransferConnector();

  TestCase& EnableFileTransferConnectorNewUX();

  TestCase& FileTransferConnectorReportOnlyMode();

  TestCase& BypassRequiresJustification();

  TestCase& EnableSearchV2();

  TestCase& EnableLocalImageSearch();

  TestCase& EnableOsFeedback();

  TestCase& DisableGoogleOneOfferFilesBanner();

  TestCase& DisableGoogleOneOfferFilesBannerWithG1Nudge();

  TestCase& FeatureIds(const std::vector<std::string>& ids);

  TestCase& EnableBulkPinning();

  TestCase& EnableDriveShortcuts();

  TestCase& SetDeviceMode(DeviceMode device_mode);

  TestCase& SetTestAccountType(TestAccountType test_account_type);

  TestCase& EnableCrosComponents();

  TestCase& EnableSkyVault();

  std::string GetFullName() const;

  const char* const name;
  FileManagerBrowserTestBase::Options options;
};

std::ostream& operator<<(std::ostream& out, const TestCase& test_case);

// Returns testcase full name.
std::string PostTestCaseName(const ::testing::TestParamInfo<TestCase>& test);

}  // namespace test
}  // namespace file_manager

#endif  // CHROME_BROWSER_ASH_FILE_MANAGER_FILE_MANAGER_BROWSERTEST_UTILS_H_