| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 ACTION_P(DelayDoCloseWindow, delay) { | 315 ACTION_P(DelayDoCloseWindow, delay) { |
| 316 DCHECK(base::MessageLoop::current()); | 316 DCHECK(base::MessageLoop::current()); |
| 317 base::MessageLoop::current()->PostDelayedTask( | 317 base::MessageLoop::current()->PostDelayedTask( |
| 318 FROM_HERE, base::Bind(DoCloseWindowNow, arg0), | 318 FROM_HERE, base::Bind(DoCloseWindowNow, arg0), |
| 319 base::TimeDelta::FromMilliseconds(delay)); | 319 base::TimeDelta::FromMilliseconds(delay)); |
| 320 } | 320 } |
| 321 | 321 |
| 322 ACTION(KillChromeFrameProcesses) { | 322 ACTION(KillChromeFrameProcesses) { |
| 323 base::KillAllNamedProcessesWithArgument( | 323 base::KillAllNamedProcessesWithArgument( |
| 324 UTF8ToWide(chrome_frame_test::kChromeImageName), | 324 base::UTF8ToWide(chrome_frame_test::kChromeImageName), |
| 325 UTF8ToWide(switches::kChromeFrame)); | 325 base::UTF8ToWide(switches::kChromeFrame)); |
| 326 } | 326 } |
| 327 | 327 |
| 328 // Verifying actions | 328 // Verifying actions |
| 329 ACTION_P(AccExpect, matcher) { | 329 ACTION_P(AccExpect, matcher) { |
| 330 scoped_refptr<AccObject> object; | 330 scoped_refptr<AccObject> object; |
| 331 EXPECT_TRUE(FindAccObjectInWindow(arg0, matcher, &object)); | 331 EXPECT_TRUE(FindAccObjectInWindow(arg0, matcher, &object)); |
| 332 } | 332 } |
| 333 | 333 |
| 334 ACTION_P2(AccExpectInRenderer, mock, matcher) { | 334 ACTION_P2(AccExpectInRenderer, mock, matcher) { |
| 335 AccInWindow<void>(AccExpect(matcher), | 335 AccInWindow<void>(AccExpect(matcher), |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 loop->PostDelayedTask( | 448 loop->PostDelayedTask( |
| 449 FROM_HERE, | 449 FROM_HERE, |
| 450 base::Bind(simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), | 450 base::Bind(simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), |
| 451 next_delay); | 451 next_delay); |
| 452 } | 452 } |
| 453 | 453 |
| 454 } // namespace chrome_frame_test | 454 } // namespace chrome_frame_test |
| 455 | 455 |
| 456 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ | 456 #endif // CHROME_FRAME_TEST_MOCK_IE_EVENT_SINK_ACTIONS_H_ |
| OLD | NEW |