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 // Unit tests for ChromeFrameActivex. | 5 // Unit tests for ChromeFrameActivex. |
6 | 6 |
7 #include "chrome_frame/chrome_frame_activex.h" | 7 #include "chrome_frame/chrome_frame_activex.h" |
8 | 8 |
9 #include "ceee/common/initializing_coclass.h" | 9 #include "ceee/common/initializing_coclass.h" |
10 #include "ceee/testing/utils/test_utils.h" | 10 #include "ceee/testing/utils/test_utils.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 COM_INTERFACE_ENTRY(IServiceProvider) | 45 COM_INTERFACE_ENTRY(IServiceProvider) |
46 END_COM_MAP() | 46 END_COM_MAP() |
47 DECLARE_PROTECT_FINAL_CONSTRUCT() | 47 DECLARE_PROTECT_FINAL_CONSTRUCT() |
48 | 48 |
49 HRESULT Initialize(MockChromeFrameClientSite** client_site) { | 49 HRESULT Initialize(MockChromeFrameClientSite** client_site) { |
50 *client_site = this; | 50 *client_site = this; |
51 return S_OK; | 51 return S_OK; |
52 } | 52 } |
53 }; | 53 }; |
54 | 54 |
55 TEST(ChromeFrameActivex, ShouldShowVersionMismatchDialog) { | 55 // http://code.google.com/p/chromium/issues/detail?id=62636 |
| 56 TEST(ChromeFrameActivex, DISABLED_ShouldShowVersionMismatchDialog) { |
56 // If not privileged, we always show the dialog. | 57 // If not privileged, we always show the dialog. |
57 ASSERT_TRUE( | 58 ASSERT_TRUE( |
58 TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( | 59 TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( |
59 false, NULL)); | 60 false, NULL)); |
60 | 61 |
61 MockChromeFrameClientSite* cs_keeper; | 62 MockChromeFrameClientSite* cs_keeper; |
62 ScopedComPtr<IOleClientSite> cs; | 63 ScopedComPtr<IOleClientSite> cs; |
63 ASSERT_HRESULT_SUCCEEDED( | 64 ASSERT_HRESULT_SUCCEEDED( |
64 InitializingCoClass<MockChromeFrameClientSite>::CreateInitialized( | 65 InitializingCoClass<MockChromeFrameClientSite>::CreateInitialized( |
65 &cs_keeper, cs.Receive())); | 66 &cs_keeper, cs.Receive())); |
(...skipping 25 matching lines...) Expand all Loading... |
91 // Also test that we fail safe, showing the dialog unless we got | 92 // Also test that we fail safe, showing the dialog unless we got |
92 // an affirmative do-not-show. | 93 // an affirmative do-not-show. |
93 EXPECT_CALL(*cfp_keeper, ShouldShowVersionMismatchDialog()) | 94 EXPECT_CALL(*cfp_keeper, ShouldShowVersionMismatchDialog()) |
94 .WillOnce(Return(E_UNEXPECTED)); | 95 .WillOnce(Return(E_UNEXPECTED)); |
95 ASSERT_TRUE( | 96 ASSERT_TRUE( |
96 TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( | 97 TestingChromeFrameActivex::TestingShouldShowVersionMismatchDialog( |
97 true, cs_keeper)); | 98 true, cs_keeper)); |
98 } | 99 } |
99 | 100 |
100 } // namespace | 101 } // namespace |
OLD | NEW |