| 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 // IE browser helper object implementation. | 5 // IE browser helper object implementation. |
| 6 #include "ceee/ie/plugin/bho/browser_helper_object.h" | 6 #include "ceee/ie/plugin/bho/browser_helper_object.h" |
| 7 | 7 |
| 8 #include <exdisp.h> | 8 #include <exdisp.h> |
| 9 #include <shlguid.h> | 9 #include <shlguid.h> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 MOCK_METHOD3(InsertCode, HRESULT(BSTR code, BSTR file, | 73 MOCK_METHOD3(InsertCode, HRESULT(BSTR code, BSTR file, |
| 74 CeeeTabCodeType type)); | 74 CeeeTabCodeType type)); |
| 75 MOCK_METHOD0(RedoDoneInjections, void()); | 75 MOCK_METHOD0(RedoDoneInjections, void()); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class TestingBrowserHelperObject | 78 class TestingBrowserHelperObject |
| 79 : public BrowserHelperObject, | 79 : public BrowserHelperObject, |
| 80 public InstanceCountMixin<TestingBrowserHelperObject>, | 80 public InstanceCountMixin<TestingBrowserHelperObject>, |
| 81 public InitializingCoClass<TestingBrowserHelperObject> { | 81 public InitializingCoClass<TestingBrowserHelperObject> { |
| 82 public: | 82 public: |
| 83 TestingBrowserHelperObject() : mock_broker_rpc_client_(false) {} |
| 84 |
| 83 HRESULT Initialize(TestingBrowserHelperObject** self) { | 85 HRESULT Initialize(TestingBrowserHelperObject** self) { |
| 84 // Make sure this is done early so we can mock it. | 86 // Make sure this is done early so we can mock it. |
| 85 EXPECT_HRESULT_SUCCEEDED(MockChromeFrameHost::CreateInitializedIID( | 87 EXPECT_HRESULT_SUCCEEDED(MockChromeFrameHost::CreateInitializedIID( |
| 86 &mock_chrome_frame_host_, IID_IChromeFrameHost, | 88 &mock_chrome_frame_host_, IID_IChromeFrameHost, |
| 87 &mock_chrome_frame_host_keeper_)); | 89 &mock_chrome_frame_host_keeper_)); |
| 88 chrome_frame_host_ = mock_chrome_frame_host_; | 90 chrome_frame_host_ = mock_chrome_frame_host_; |
| 89 *self = this; | 91 *self = this; |
| 90 return S_OK; | 92 return S_OK; |
| 91 } | 93 } |
| 92 | 94 |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 | 894 |
| 893 EXPECT_CALL(ceee_module_utils, GetOptionToolbandIsHidden()) | 895 EXPECT_CALL(ceee_module_utils, GetOptionToolbandIsHidden()) |
| 894 .WillOnce(Return(true)); | 896 .WillOnce(Return(true)); |
| 895 ASSERT_HRESULT_FAILED( | 897 ASSERT_HRESULT_FAILED( |
| 896 TestingBrowserHelperObject::CreateInitialized(&bho, | 898 TestingBrowserHelperObject::CreateInitialized(&bho, |
| 897 bho_with_site.Receive())); | 899 bho_with_site.Receive())); |
| 898 ASSERT_EQ(0, testing::InstanceCountMixinBase::all_instance_count()); | 900 ASSERT_EQ(0, testing::InstanceCountMixinBase::all_instance_count()); |
| 899 } | 901 } |
| 900 | 902 |
| 901 } // namespace | 903 } // namespace |
| OLD | NEW |