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 // A test that hosts and excercises the webbrowser control to test | 5 // A test that hosts and excercises the webbrowser control to test |
6 // its event firing behavior. | 6 // its event firing behavior. |
7 #include <guiddef.h> | 7 #include <guiddef.h> |
8 #include <mshtml.h> | 8 #include <mshtml.h> |
9 #include <shlguid.h> | 9 #include <shlguid.h> |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 IWebBrowser2* browser() const { return browser_; } | 64 IWebBrowser2* browser() const { return browser_; } |
65 IHTMLDocument2* document() const { return document_; } | 65 IHTMLDocument2* document() const { return document_; } |
66 }; | 66 }; |
67 | 67 |
68 class TestingBrowserHelperObject | 68 class TestingBrowserHelperObject |
69 : public BrowserHelperObject, | 69 : public BrowserHelperObject, |
70 public InitializingCoClass<TestingBrowserHelperObject>, | 70 public InitializingCoClass<TestingBrowserHelperObject>, |
71 public InstanceCountMixin<TestingBrowserHelperObject> { | 71 public InstanceCountMixin<TestingBrowserHelperObject> { |
72 public: | 72 public: |
73 TestingBrowserHelperObject() : mock_chrome_frame_host_(NULL) { | 73 TestingBrowserHelperObject() |
| 74 : mock_chrome_frame_host_(NULL), |
| 75 mock_broker_rpc_client_(false) { |
74 } | 76 } |
75 | 77 |
76 HRESULT Initialize(TestingBrowserHelperObject** self) { | 78 HRESULT Initialize(TestingBrowserHelperObject** self) { |
77 *self = this; | 79 *self = this; |
78 return S_OK; | 80 return S_OK; |
79 } | 81 } |
80 | 82 |
81 HRESULT CreateFrameEventHandler(IWebBrowser2* browser, | 83 HRESULT CreateFrameEventHandler(IWebBrowser2* browser, |
82 IWebBrowser2* parent_browser, | 84 IWebBrowser2* parent_browser, |
83 IFrameEventHandler** handler) { | 85 IFrameEventHandler** handler) { |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 | 577 |
576 // We should still have the same set of frames. | 578 // We should still have the same set of frames. |
577 EXPECT_TRUE(bho_->ExpectHasFrames(orphan_page_resources)); | 579 EXPECT_TRUE(bho_->ExpectHasFrames(orphan_page_resources)); |
578 | 580 |
579 // One handler per resource. | 581 // One handler per resource. |
580 EXPECT_EQ(arraysize(orphan_page_resources), | 582 EXPECT_EQ(arraysize(orphan_page_resources), |
581 TestingFrameEventHandler::instance_count()); | 583 TestingFrameEventHandler::instance_count()); |
582 } | 584 } |
583 | 585 |
584 } // namespace | 586 } // namespace |
OLD | NEW |