Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 9375017: Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.h ('k') | content/app/content_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 int CFUrlRequestUnittestRunner::PreCreateThreads() { 620 int 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 return 0; 628 return 0;
625 } 629 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 // content::InitializeSandboxInfo(&sandbox_info); 754 // content::InitializeSandboxInfo(&sandbox_info);
751 FakeMainDelegate delegate; 755 FakeMainDelegate delegate;
752 content::ContentMain( 756 content::ContentMain(
753 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), 757 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)),
754 &sandbox_info, 758 &sandbox_info,
755 &delegate); 759 &delegate);
756 760
757 // Note: In debug builds, we ExitProcess during PostDestroyThreads. 761 // Note: In debug builds, we ExitProcess during PostDestroyThreads.
758 return g_test_suite->test_result(); 762 return g_test_suite->test_result();
759 } 763 }
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.h ('k') | content/app/content_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698