| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "chrome/common/chrome_paths_internal.h" | 42 #include "chrome/common/chrome_paths_internal.h" |
| 43 #include "chrome/common/chrome_switches.h" | 43 #include "chrome/common/chrome_switches.h" |
| 44 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 45 #include "chrome/renderer/chrome_content_renderer_client.h" | 45 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 46 #include "chrome_frame/crash_server_init.h" | 46 #include "chrome_frame/crash_server_init.h" |
| 47 #include "chrome_frame/test/chrome_frame_test_utils.h" | 47 #include "chrome_frame/test/chrome_frame_test_utils.h" |
| 48 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" | 48 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" |
| 49 #include "chrome_frame/test/simulate_input.h" | 49 #include "chrome_frame/test/simulate_input.h" |
| 50 #include "chrome_frame/test/win_event_receiver.h" | 50 #include "chrome_frame/test/win_event_receiver.h" |
| 51 #include "chrome_frame/utils.h" | 51 #include "chrome_frame/utils.h" |
| 52 #include "content/app/content_main.h" | 52 #include "content/public/app/content_main.h" |
| 53 #include "content/public/app/startup_helper_win.h" | 53 #include "content/public/app/startup_helper_win.h" |
| 54 #include "content/public/browser/browser_thread.h" | 54 #include "content/public/browser/browser_thread.h" |
| 55 #include "content/public/browser/notification_service.h" | 55 #include "content/public/browser/notification_service.h" |
| 56 #include "content/public/browser/render_process_host.h" | 56 #include "content/public/browser/render_process_host.h" |
| 57 #include "content/public/common/content_client.h" | 57 #include "content/public/common/content_client.h" |
| 58 #include "content/public/common/content_paths.h" | 58 #include "content/public/common/content_paths.h" |
| 59 #include "sandbox/src/sandbox_types.h" | 59 #include "sandbox/src/sandbox_types.h" |
| 60 #include "testing/gtest/include/gtest/gtest.h" | 60 #include "testing/gtest/include/gtest/gtest.h" |
| 61 #include "ui/base/resource/resource_bundle.h" | 61 #include "ui/base/resource/resource_bundle.h" |
| 62 #include "ui/base/ui_base_paths.h" | 62 #include "ui/base/ui_base_paths.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 // We want process and thread IDs because we may have multiple processes. | 606 // We want process and thread IDs because we may have multiple processes. |
| 607 // Note: temporarily enabled timestamps in an effort to catch bug 6361. | 607 // Note: temporarily enabled timestamps in an effort to catch bug 6361. |
| 608 logging::SetLogItems(true, true, true, true); | 608 logging::SetLogItems(true, true, true, true); |
| 609 } | 609 } |
| 610 | 610 |
| 611 void CFUrlRequestUnittestRunner::PreEarlyInitialization() { | 611 void CFUrlRequestUnittestRunner::PreEarlyInitialization() { |
| 612 testing::InitGoogleTest(&g_argc, g_argv); | 612 testing::InitGoogleTest(&g_argc, g_argv); |
| 613 FilterDisabledTests(); | 613 FilterDisabledTests(); |
| 614 } | 614 } |
| 615 | 615 |
| 616 MessageLoop* CFUrlRequestUnittestRunner::GetMainMessageLoop() { |
| 617 return NULL; |
| 618 } |
| 619 |
| 616 void CFUrlRequestUnittestRunner::PreCreateThreads() { | 620 void CFUrlRequestUnittestRunner::PreCreateThreads() { |
| 617 fake_chrome_.reset(new FakeExternalTab()); | 621 fake_chrome_.reset(new FakeExternalTab()); |
| 618 fake_chrome_->Initialize(); | 622 fake_chrome_->Initialize(); |
| 619 fake_chrome_->browser_process()->PreCreateThreads(); | 623 fake_chrome_->browser_process()->PreCreateThreads(); |
| 620 | 624 |
| 621 pss_subclass_.reset(new ProcessSingletonSubclass(this)); | 625 pss_subclass_.reset(new ProcessSingletonSubclass(this)); |
| 622 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_->user_data())); | 626 EXPECT_TRUE(pss_subclass_->Subclass(fake_chrome_->user_data())); |
| 623 StartChromeFrameInHostBrowser(); | 627 StartChromeFrameInHostBrowser(); |
| 624 } | 628 } |
| 625 | 629 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 // content::InitializeSandboxInfo(&sandbox_info); | 753 // content::InitializeSandboxInfo(&sandbox_info); |
| 750 FakeMainDelegate delegate; | 754 FakeMainDelegate delegate; |
| 751 content::ContentMain( | 755 content::ContentMain( |
| 752 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 756 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
| 753 &sandbox_info, | 757 &sandbox_info, |
| 754 &delegate); | 758 &delegate); |
| 755 | 759 |
| 756 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 760 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
| 757 return g_test_suite->test_result(); | 761 return g_test_suite->test_result(); |
| 758 } | 762 } |
| OLD | NEW |