OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome_frame/test/net/fake_external_tab.h" | 5 #include "chrome_frame/test/net/fake_external_tab.h" |
6 | 6 |
7 #include <exdisp.h> | 7 #include <exdisp.h> |
8 | 8 |
9 #include "app/app_paths.h" | 9 #include "app/app_paths.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 void CFUrlRequestUnittestRunner::OnInitialTabLoaded() { | 272 void CFUrlRequestUnittestRunner::OnInitialTabLoaded() { |
273 test_http_server_.reset(); | 273 test_http_server_.reset(); |
274 StartTests(); | 274 StartTests(); |
275 } | 275 } |
276 | 276 |
277 void CFUrlRequestUnittestRunner::RunMainUIThread() { | 277 void CFUrlRequestUnittestRunner::RunMainUIThread() { |
278 DCHECK(MessageLoop::current()); | 278 DCHECK(MessageLoop::current()); |
279 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); | 279 DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI); |
280 | 280 |
281 // Register the main thread by instantiating it, but don't call any methods. | 281 // Register the main thread by instantiating it, but don't call any methods. |
282 ChromeThread main_thread; | 282 ChromeThread main_thread(ChromeThread::UI, MessageLoop::current()); |
283 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); | 283 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
284 | 284 |
285 MessageLoop::current()->Run(); | 285 MessageLoop::current()->Run(); |
286 } | 286 } |
287 | 287 |
288 void CFUrlRequestUnittestRunner::StartTests() { | 288 void CFUrlRequestUnittestRunner::StartTests() { |
289 if (PromptAfterSetup()) | 289 if (PromptAfterSetup()) |
290 MessageBoxA(NULL, "click ok to run", "", MB_OK); | 290 MessageBoxA(NULL, "click ok to run", "", MB_OK); |
291 | 291 |
292 DCHECK_EQ(test_thread_.IsValid(), false); | 292 DCHECK_EQ(test_thread_.IsValid(), false); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 DialogWatchdog watchdog; | 382 DialogWatchdog watchdog; |
383 // See url_request_unittest.cc for these credentials. | 383 // See url_request_unittest.cc for these credentials. |
384 SupplyProxyCredentials credentials("user", "secret"); | 384 SupplyProxyCredentials credentials("user", "secret"); |
385 watchdog.AddObserver(&credentials); | 385 watchdog.AddObserver(&credentials); |
386 testing::InitGoogleTest(&argc, argv); | 386 testing::InitGoogleTest(&argc, argv); |
387 FilterDisabledTests(); | 387 FilterDisabledTests(); |
388 CFUrlRequestUnittestRunner test_suite(argc, argv); | 388 CFUrlRequestUnittestRunner test_suite(argc, argv); |
389 test_suite.RunMainUIThread(); | 389 test_suite.RunMainUIThread(); |
390 return 0; | 390 return 0; |
391 } | 391 } |
OLD | NEW |