OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ | 5 #ifndef CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ |
6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ | 6 #define CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 base::Bind(&NavigateToCurrentUrl, mock), delay); | 43 base::Bind(&NavigateToCurrentUrl, mock), delay); |
44 } | 44 } |
45 | 45 |
46 ACTION_P(CloseBrowserMock, mock) { | 46 ACTION_P(CloseBrowserMock, mock) { |
47 mock->event_sink()->CloseWebBrowser(); | 47 mock->event_sink()->CloseWebBrowser(); |
48 } | 48 } |
49 | 49 |
50 ACTION_P3(DelayCloseBrowserMock, loop, delay, mock) { | 50 ACTION_P3(DelayCloseBrowserMock, loop, delay, mock) { |
51 loop->PostDelayedTask( | 51 loop->PostDelayedTask( |
52 FROM_HERE, | 52 FROM_HERE, |
53 base::IgnoreReturn<HRESULT>( | 53 base::Bind(base::IgnoreResult(&IEEventSink::CloseWebBrowser), |
54 base::Bind(&IEEventSink::CloseWebBrowser, mock->event_sink())), | 54 mock->event_sink()), |
55 delay); | 55 delay); |
56 } | 56 } |
57 | 57 |
58 ACTION_P2(ConnectDocPropNotifySink, mock, sink) { | 58 ACTION_P2(ConnectDocPropNotifySink, mock, sink) { |
59 base::win::ScopedComPtr<IDispatch> document; | 59 base::win::ScopedComPtr<IDispatch> document; |
60 mock->event_sink()->web_browser2()->get_Document(document.Receive()); | 60 mock->event_sink()->web_browser2()->get_Document(document.Receive()); |
61 EXPECT_TRUE(document != NULL); // NOLINT | 61 EXPECT_TRUE(document != NULL); // NOLINT |
62 if (document) { | 62 if (document) { |
63 sink->Attach(document); | 63 sink->Attach(document); |
64 } | 64 } |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 405 |
406 loop->PostDelayedTask( | 406 loop->PostDelayedTask( |
407 FROM_HERE, | 407 FROM_HERE, |
408 base::Bind(simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), | 408 base::Bind(simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), |
409 next_delay); | 409 next_delay); |
410 } | 410 } |
411 | 411 |
412 } // namespace chrome_frame_test | 412 } // namespace chrome_frame_test |
413 | 413 |
414 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ | 414 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ |
OLD | NEW |