| 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 #include "chrome_frame/test/net/fake_external_tab.h" | 5 #include "chrome_frame/test/net/fake_external_tab.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <exdisp.h> | 9 #include <exdisp.h> |
| 10 | 10 |
| 11 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 12 #include "base/debug/debugger.h" | 13 #include "base/debug/debugger.h" |
| 13 #include "base/file_util.h" | 14 #include "base/file_util.h" |
| 14 #include "base/file_version_info.h" | 15 #include "base/file_version_info.h" |
| 15 #include "base/i18n/icu_util.h" | 16 #include "base/i18n/icu_util.h" |
| 16 #include "base/lazy_instance.h" | 17 #include "base/lazy_instance.h" |
| 17 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 19 #include "base/scoped_temp_dir.h" | 20 #include "base/scoped_temp_dir.h" |
| 20 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 410 |
| 410 // static | 411 // static |
| 411 DWORD CFUrlRequestUnittestRunner::RunAllUnittests(void* param) { | 412 DWORD CFUrlRequestUnittestRunner::RunAllUnittests(void* param) { |
| 412 base::PlatformThread::SetName("CFUrlRequestUnittestRunner"); | 413 base::PlatformThread::SetName("CFUrlRequestUnittestRunner"); |
| 413 // Needed for some url request tests like the intercept job tests, etc. | 414 // Needed for some url request tests like the intercept job tests, etc. |
| 414 NotificationServiceImpl service; | 415 NotificationServiceImpl service; |
| 415 CFUrlRequestUnittestRunner* me = | 416 CFUrlRequestUnittestRunner* me = |
| 416 reinterpret_cast<CFUrlRequestUnittestRunner*>(param); | 417 reinterpret_cast<CFUrlRequestUnittestRunner*>(param); |
| 417 me->test_result_ = me->Run(); | 418 me->test_result_ = me->Run(); |
| 418 me->fake_chrome_.ui_loop()->PostTask(FROM_HERE, | 419 me->fake_chrome_.ui_loop()->PostTask(FROM_HERE, |
| 419 NewRunnableFunction(TakeDownBrowser, me)); | 420 base::Bind(TakeDownBrowser, me)); |
| 420 return 0; | 421 return 0; |
| 421 } | 422 } |
| 422 | 423 |
| 423 // static | 424 // static |
| 424 void CFUrlRequestUnittestRunner::TakeDownBrowser( | 425 void CFUrlRequestUnittestRunner::TakeDownBrowser( |
| 425 CFUrlRequestUnittestRunner* me) { | 426 CFUrlRequestUnittestRunner* me) { |
| 426 if (PromptAfterSetup()) | 427 if (PromptAfterSetup()) |
| 427 MessageBoxA(NULL, "click ok to exit", "", MB_OK); | 428 MessageBoxA(NULL, "click ok to exit", "", MB_OK); |
| 428 | 429 |
| 429 me->ShutDownHostBrowser(); | 430 me->ShutDownHostBrowser(); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); | 618 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); |
| 618 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); | 619 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); |
| 619 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which | 620 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which |
| 620 // check if globals are created and destroyed on the same thread don't fire. | 621 // check if globals are created and destroyed on the same thread don't fire. |
| 621 // Webkit global objects are created on the inproc renderer thread. | 622 // Webkit global objects are created on the inproc renderer thread. |
| 622 #if !defined(NDEBUG) | 623 #if !defined(NDEBUG) |
| 623 ExitProcess(test_suite.test_result()); | 624 ExitProcess(test_suite.test_result()); |
| 624 #endif // NDEBUG | 625 #endif // NDEBUG |
| 625 return test_suite.test_result(); | 626 return test_suite.test_result(); |
| 626 } | 627 } |
| OLD | NEW |