| 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; } |
| 48 | 49 |
| 49 // Configures everything for an in process browser test, then invokes | 50 // Configures everything for an in process browser test, then invokes |
| 50 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. | 51 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop. |
| 51 virtual void SetUp(); | 52 virtual void SetUp(); |
| 52 | 53 |
| 53 // Restores state configured in SetUp. | 54 // Restores state configured in SetUp. |
| 54 virtual void TearDown(); | 55 virtual void TearDown(); |
| 55 | 56 |
| 56 // This method is used to decide if user data dir | 57 // This method is used to decide if user data dir |
| 57 // needs to be deleted or not. | 58 // needs to be deleted or not. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 180 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ |
| 180 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 181 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() |
| 181 | 182 |
| 182 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ | 183 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ |
| 183 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ | 184 IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ |
| 184 ::testing::internal::GetTypeId<test_fixture>()) | 185 ::testing::internal::GetTypeId<test_fixture>()) |
| 185 | 186 |
| 186 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) | 187 #endif // defined(ALLOW_IN_PROC_BROWSER_TEST) |
| 187 | 188 |
| 188 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 189 #endif // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ |
| OLD | NEW |