OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 5 #ifndef CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 6 #define CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 #include "content/public/test/browser_test.h" | 15 #include "content/public/test/browser_test.h" |
16 #include "content/public/test/browser_test_base.h" | 16 #include "content/public/test/browser_test_base.h" |
17 #include "storage/browser/quota/quota_settings.h" | 17 #include "storage/browser/quota/quota_settings.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "ui/base/page_transition_types.h" | 19 #include "ui/base/page_transition_types.h" |
20 | 20 |
| 21 #if defined(OS_MACOSX) |
| 22 #include "ui/base/test/scoped_fake_full_keyboard_access.h" |
| 23 #endif |
| 24 |
21 namespace base { | 25 namespace base { |
22 | 26 |
23 class CommandLine; | 27 class CommandLine; |
24 | 28 |
25 #if defined(OS_MACOSX) | 29 #if defined(OS_MACOSX) |
26 namespace mac { | 30 namespace mac { |
27 class ScopedNSAutoreleasePool; | 31 class ScopedNSAutoreleasePool; |
28 } // namespace mac | 32 } // namespace mac |
29 #endif // defined(OS_MACOSX) | 33 #endif // defined(OS_MACOSX) |
30 | 34 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // True if the accessibility test should run for a particular test case. | 261 // True if the accessibility test should run for a particular test case. |
258 // This is reset for every test case. | 262 // This is reset for every test case. |
259 bool run_accessibility_checks_for_test_case_; | 263 bool run_accessibility_checks_for_test_case_; |
260 | 264 |
261 // We use hardcoded quota settings to have a consistent testing environment. | 265 // We use hardcoded quota settings to have a consistent testing environment. |
262 storage::QuotaSettings quota_settings_; | 266 storage::QuotaSettings quota_settings_; |
263 | 267 |
264 #if defined(OS_MACOSX) | 268 #if defined(OS_MACOSX) |
265 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; | 269 base::mac::ScopedNSAutoreleasePool* autorelease_pool_; |
266 std::unique_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; | 270 std::unique_ptr<ScopedBundleSwizzlerMac> bundle_swizzler_; |
| 271 |
| 272 // Enable fake full keyboard access by default, so that tests don't depend on |
| 273 // system setting of the test machine. Also, this helps to make tests on Mac |
| 274 // more consistent with other platforms, where most views are focusable by |
| 275 // default. |
| 276 ui::test::ScopedFakeFullKeyboardAccess faked_full_keyboard_access_; |
267 #endif // OS_MACOSX | 277 #endif // OS_MACOSX |
268 | 278 |
269 #if defined(OS_WIN) | 279 #if defined(OS_WIN) |
270 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_; | 280 std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
271 #endif | 281 #endif |
272 }; | 282 }; |
273 | 283 |
274 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 284 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |