| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // | 60 // |
| 61 // CleanUpOnMainThread() is called just after executing the real test code to | 61 // CleanUpOnMainThread() is called just after executing the real test code to |
| 62 // do necessary cleanup before the browser is torn down. | 62 // do necessary cleanup before the browser is torn down. |
| 63 // | 63 // |
| 64 // TearDownInProcessBrowserTestFixture() is called after BrowserMain() exits to | 64 // TearDownInProcessBrowserTestFixture() is called after BrowserMain() exits to |
| 65 // cleanup things setup for running the browser. | 65 // cleanup things setup for running the browser. |
| 66 // | 66 // |
| 67 // By default InProcessBrowserTest creates a single Browser (as returned from | 67 // By default InProcessBrowserTest creates a single Browser (as returned from |
| 68 // the CreateBrowser method). You can obviously create more as needed. | 68 // the CreateBrowser method). You can obviously create more as needed. |
| 69 | 69 |
| 70 // Browsers created while InProcessBrowserTest is running are shown hidden. Use | |
| 71 // the command line switch --show-windows to make them visible when debugging. | |
| 72 // | |
| 73 // InProcessBrowserTest disables the sandbox when running. | 70 // InProcessBrowserTest disables the sandbox when running. |
| 74 // | 71 // |
| 75 // See ui_test_utils for a handful of methods designed for use with this class. | 72 // See ui_test_utils for a handful of methods designed for use with this class. |
| 76 class InProcessBrowserTest : public testing::Test { | 73 class InProcessBrowserTest : public testing::Test { |
| 77 public: | 74 public: |
| 78 InProcessBrowserTest(); | 75 InProcessBrowserTest(); |
| 79 virtual ~InProcessBrowserTest(); | 76 virtual ~InProcessBrowserTest(); |
| 80 | 77 |
| 81 // We do this so we can be used in a Task. | 78 // We do this so we can be used in a Task. |
| 82 void AddRef() {} | 79 void AddRef() {} |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ | 283 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ |
| 287 }; \ | 284 }; \ |
| 288 int GTEST_TEST_CLASS_NAME_(test_case_name, \ | 285 int GTEST_TEST_CLASS_NAME_(test_case_name, \ |
| 289 test_name)::gtest_registering_dummy_ = \ | 286 test_name)::gtest_registering_dummy_ = \ |
| 290 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ | 287 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ |
| 291 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 288 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() |
| 292 | 289 |
| 293 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) | 290 #endif // defined(HAS_OUT_OF_PROC_TEST_RUNNER) |
| 294 | 291 |
| 295 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ | 292 #endif // CHROME_TEST_BASE_IN_PROCESS_BROWSER_TEST_H_ |
| OLD | NEW |