OLD | NEW |
1 // Copyright (c) 2010 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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ACTION_P(CloseBrowserMock, mock) { | 45 ACTION_P(CloseBrowserMock, mock) { |
46 mock->event_sink()->CloseWebBrowser(); | 46 mock->event_sink()->CloseWebBrowser(); |
47 } | 47 } |
48 | 48 |
49 ACTION_P3(DelayCloseBrowserMock, loop, delay, mock) { | 49 ACTION_P3(DelayCloseBrowserMock, loop, delay, mock) { |
50 loop->PostDelayedTask(FROM_HERE, NewRunnableMethod(mock->event_sink(), | 50 loop->PostDelayedTask(FROM_HERE, NewRunnableMethod(mock->event_sink(), |
51 &IEEventSink::CloseWebBrowser), delay); | 51 &IEEventSink::CloseWebBrowser), delay); |
52 } | 52 } |
53 | 53 |
54 ACTION_P2(ConnectDocPropNotifySink, mock, sink) { | 54 ACTION_P2(ConnectDocPropNotifySink, mock, sink) { |
55 ScopedComPtr<IDispatch> document; | 55 base::win::ScopedComPtr<IDispatch> document; |
56 mock->event_sink()->web_browser2()->get_Document(document.Receive()); | 56 mock->event_sink()->web_browser2()->get_Document(document.Receive()); |
57 EXPECT_TRUE(document != NULL); // NOLINT | 57 EXPECT_TRUE(document != NULL); // NOLINT |
58 if (document) { | 58 if (document) { |
59 sink->Attach(document); | 59 sink->Attach(document); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 ACTION_P(DisconnectDocPropNotifySink, sink) { | 63 ACTION_P(DisconnectDocPropNotifySink, sink) { |
64 sink->Detach(); | 64 sink->Detach(); |
65 } | 65 } |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 next_delay = next_delay + kInterval; | 399 next_delay = next_delay + kInterval; |
400 | 400 |
401 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( | 401 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( |
402 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), | 402 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), |
403 next_delay); | 403 next_delay); |
404 } | 404 } |
405 | 405 |
406 } // namespace chrome_frame_test | 406 } // namespace chrome_frame_test |
407 | 407 |
408 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ | 408 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ |
OLD | NEW |