OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
grt (UTC plus 2)
2011/10/14 14:35:00
2011
robertshield
2011/10/17 13:38:13
Done.
| |
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 // Mock objects for Chrome Frame interfaces. | 5 // Mock objects for Chrome Frame interfaces. |
6 | 6 |
7 #ifndef CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ | 7 #ifndef CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ |
8 #define CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ | 8 #define CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ |
9 | 9 |
10 #include "chrome_frame/chrome_tab.h" | |
10 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
11 | 12 |
12 // Include without path to make GYP build see it. | |
13 #include "chrome_tab.h" // NOLINT | |
14 | |
15 namespace testing { | 13 namespace testing { |
16 | 14 |
17 class IChromeFramePrivilegedMockImpl : public IChromeFramePrivileged { | 15 class IChromeFramePrivilegedMockImpl : public IChromeFramePrivileged { |
18 public: | 16 public: |
19 // Auto-generated by target chrome_frame_privileged_mock | 17 // Auto-generated by target chrome_frame_privileged_mock |
20 #include "mock_ichromeframeprivileged.gen" // NOLINT | 18 #include "mock_ichromeframeprivileged.gen" // NOLINT |
21 }; | 19 }; |
22 | 20 |
23 class MockIChromeFramePrivileged | 21 class MockIChromeFramePrivileged |
24 : public CComObjectRootEx<CComSingleThreadModel>, | 22 : public CComObjectRootEx<CComSingleThreadModel>, |
25 public testing::StrictMock<IChromeFramePrivilegedMockImpl> { | 23 public testing::StrictMock<IChromeFramePrivilegedMockImpl> { |
26 public: | 24 public: |
27 DECLARE_NOT_AGGREGATABLE(MockIChromeFramePrivileged) | 25 DECLARE_NOT_AGGREGATABLE(MockIChromeFramePrivileged) |
28 BEGIN_COM_MAP(MockIChromeFramePrivileged) | 26 BEGIN_COM_MAP(MockIChromeFramePrivileged) |
29 COM_INTERFACE_ENTRY(IChromeFramePrivileged) | 27 COM_INTERFACE_ENTRY(IChromeFramePrivileged) |
30 END_COM_MAP() | 28 END_COM_MAP() |
31 DECLARE_PROTECT_FINAL_CONSTRUCT() | 29 DECLARE_PROTECT_FINAL_CONSTRUCT() |
32 | 30 |
33 HRESULT Initialize(MockIChromeFramePrivileged** cfp) { | 31 HRESULT Initialize(MockIChromeFramePrivileged** cfp) { |
34 *cfp = this; | 32 *cfp = this; |
35 return S_OK; | 33 return S_OK; |
36 } | 34 } |
37 }; | 35 }; |
38 | 36 |
39 } // namespace testing | 37 } // namespace testing |
40 | 38 |
41 #endif // CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ | 39 #endif // CHROME_FRAME_TEST_CHROME_TAB_MOCKS_H_ |
OLD | NEW |