| OLD | NEW |
| 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #include "chrome_frame/test/test_mock_with_web_server.h" | 4 #include "chrome_frame/test/test_mock_with_web_server.h" |
| 5 | 5 |
| 6 #include <mshtmcid.h> | 6 #include <mshtmcid.h> |
| 7 | 7 |
| 8 #include "base/scoped_bstr_win.h" | 8 #include "base/scoped_bstr_win.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome_frame/utils.h" | 10 #include "chrome_frame/utils.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // The subsequent operations like typing in the actual url and then hitting | 216 // The subsequent operations like typing in the actual url and then hitting |
| 217 // enter to force the browser to navigate to it each execute as delayed tasks | 217 // enter to force the browser to navigate to it each execute as delayed tasks |
| 218 // timed at the delay passed in. The recommended value for delay is 2000 ms | 218 // timed at the delay passed in. The recommended value for delay is 2000 ms |
| 219 // to account for the time taken for the accelerator keys to be reflected back | 219 // to account for the time taken for the accelerator keys to be reflected back |
| 220 // from Chrome. | 220 // from Chrome. |
| 221 ACTION_P3(TypeUrlInAddressBar, loop, url, delay) { | 221 ACTION_P3(TypeUrlInAddressBar, loop, url, delay) { |
| 222 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( | 222 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( |
| 223 simulate_input::SendCharA, 'd', simulate_input::ALT), | 223 simulate_input::SendCharA, 'd', simulate_input::ALT), |
| 224 delay); | 224 delay); |
| 225 | 225 |
| 226 const unsigned int kInterval = 100; | 226 const unsigned int kInterval = 500; |
| 227 int next_delay = delay + kInterval; | 227 int next_delay = delay + kInterval; |
| 228 | 228 |
| 229 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( | 229 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( |
| 230 simulate_input::SendStringW, url), next_delay); | 230 simulate_input::SendStringW, url), next_delay); |
| 231 | 231 |
| 232 next_delay = next_delay + kInterval; | 232 next_delay = next_delay + kInterval; |
| 233 | 233 |
| 234 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( | 234 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction( |
| 235 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), | 235 simulate_input::SendCharA, VK_RETURN, simulate_input::NONE), |
| 236 next_delay); | 236 next_delay); |
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 if (hr == S_FALSE) | 1624 if (hr == S_FALSE) |
| 1625 return; | 1625 return; |
| 1626 | 1626 |
| 1627 ASSERT_TRUE(mock.web_browser2() != NULL); | 1627 ASSERT_TRUE(mock.web_browser2() != NULL); |
| 1628 | 1628 |
| 1629 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds * 2); | 1629 loop.RunFor(kChromeFrameLongNavigationTimeoutInSeconds * 2); |
| 1630 | 1630 |
| 1631 ASSERT_TRUE(new_window_mock.web_browser2() != NULL); | 1631 ASSERT_TRUE(new_window_mock.web_browser2() != NULL); |
| 1632 } | 1632 } |
| 1633 | 1633 |
| OLD | NEW |