OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_IN_PROCESS_BROWSER_TEST_H_ | 5 #ifndef CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
6 #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 6 #define CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
7 | 7 |
8 #include "net/base/mock_host_resolver.h" | 8 #include "net/base/mock_host_resolver.h" |
9 #include "net/url_request/url_request_unittest.h" | 9 #include "net/url_request/url_request_unittest.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // InProcessBrowserTest disables the sandbox when running. | 38 // InProcessBrowserTest disables the sandbox when running. |
39 // | 39 // |
40 // See ui_test_utils for a handful of methods designed for use with this class. | 40 // See ui_test_utils for a handful of methods designed for use with this class. |
41 class InProcessBrowserTest : public testing::Test { | 41 class InProcessBrowserTest : public testing::Test { |
42 public: | 42 public: |
43 InProcessBrowserTest(); | 43 InProcessBrowserTest(); |
44 | 44 |
45 // We do this so we can be used in a Task. | 45 // We do this so we can be used in a Task. |
46 void AddRef() {} | 46 void AddRef() {} |
47 void Release() {} | 47 void Release() {} |
48 static bool ImplementsThreadSafeReferenceCounting() { return false; } | |
49 | 48 |
50 // Configures everything for an in process browser test, then invokes | 49 // Configures everything for an in process browser test, then invokes |
51 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. | 50 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. |
52 virtual void SetUp(); | 51 virtual void SetUp(); |
53 | 52 |
54 // Restores state configured in SetUp. | 53 // Restores state configured in SetUp. |
55 virtual void TearDown(); | 54 virtual void TearDown(); |
56 | 55 |
57 // This method is used to decide if user data dir | 56 // This method is used to decide if user data dir |
58 // needs to be deleted or not. | 57 // needs to be deleted or not. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 179 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ |
181 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 180 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() |
182 | 181 |
183 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ | 182 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ |
184 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ | 183 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ |
185 ::testing::internal::GetTypeId<test_fixture>()) | 184 ::testing::internal::GetTypeId<test_fixture>()) |
186 | 185 |
187 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) | 186 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) |
188 | 187 |
189 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 188 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
OLD | NEW |