| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/url_request/url_request_unittest.h" | 8 #include "net/url_request/url_request_unittest.h" | 
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" | 
| 10 | 10 | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107   net::RuleBasedHostResolverProc* host_resolver() { | 107   net::RuleBasedHostResolverProc* host_resolver() { | 
| 108     return host_resolver_.get(); | 108     return host_resolver_.get(); | 
| 109   } | 109   } | 
| 110 | 110 | 
| 111   // Sets some test states (see below for comments).  Call this in your test | 111   // Sets some test states (see below for comments).  Call this in your test | 
| 112   // constructor. | 112   // constructor. | 
| 113   void set_show_window(bool show) { show_window_ = show; } | 113   void set_show_window(bool show) { show_window_ = show; } | 
| 114   void EnableDOMAutomation() { dom_automation_enabled_ = true; } | 114   void EnableDOMAutomation() { dom_automation_enabled_ = true; } | 
| 115   void EnableSingleProcess() { single_process_ = true; } | 115   void EnableSingleProcess() { single_process_ = true; } | 
| 116 | 116 | 
| 117   // Run all pending events in the message loop. |  | 
| 118   void RunAllPendingEvents(); |  | 
| 119 |  | 
| 120  private: | 117  private: | 
| 121   // Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and | 118   // Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and | 
| 122   // destroys the browser. | 119   // destroys the browser. | 
| 123   void RunTestOnMainThreadLoop(); | 120   void RunTestOnMainThreadLoop(); | 
| 124 | 121 | 
| 125   // Browser created from CreateBrowser. | 122   // Browser created from CreateBrowser. | 
| 126   Browser* browser_; | 123   Browser* browser_; | 
| 127 | 124 | 
| 128   // HTTPServer, created when StartHTTPServer is invoked. | 125   // HTTPServer, created when StartHTTPServer is invoked. | 
| 129   scoped_refptr<HTTPTestServer> http_server_; | 126   scoped_refptr<HTTPTestServer> http_server_; | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 185             GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 182             GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\ | 
| 186 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 183 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread() | 
| 187 | 184 | 
| 188 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ | 185 #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\ | 
| 189   IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ | 186   IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\ | 
| 190                     ::testing::internal::GetTypeId<test_fixture>()) | 187                     ::testing::internal::GetTypeId<test_fixture>()) | 
| 191 | 188 | 
| 192 #endif  // defined(ALLOW_IN_PROC_BROWSER_TEST) | 189 #endif  // defined(ALLOW_IN_PROC_BROWSER_TEST) | 
| 193 | 190 | 
| 194 #endif  // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 191 #endif  // CHROME_TEST_IN_PROCESS_BROWSER_TEST_H_ | 
| OLD | NEW | 
|---|