| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <oleacc.h> | 5 #include <oleacc.h> |
| 6 | 6 |
| 7 #include "chrome_frame/test/net/dialog_watchdog.h" | 7 #include "chrome_frame/test/net/dialog_watchdog.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/scoped_comptr_win.h" | 10 #include "base/scoped_comptr_win.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 DCHECK(::IsWindow(props.username_)); | 52 DCHECK(::IsWindow(props.username_)); |
| 53 DCHECK(::IsWindow(props.password_)); | 53 DCHECK(::IsWindow(props.password_)); |
| 54 | 54 |
| 55 // We can't use SetWindowText to set the username/password, so simulate | 55 // We can't use SetWindowText to set the username/password, so simulate |
| 56 // keyboard input instead. | 56 // keyboard input instead. |
| 57 chrome_frame_test::ForceSetForegroundWindow(hwnd); | 57 chrome_frame_test::ForceSetForegroundWindow(hwnd); |
| 58 CHECK(SetFocusToAccessibleWindow(props.username_)); | 58 CHECK(SetFocusToAccessibleWindow(props.username_)); |
| 59 chrome_frame_test::SendString(username_.c_str()); | 59 chrome_frame_test::SendString(username_.c_str()); |
| 60 Sleep(100); | 60 Sleep(100); |
| 61 | 61 |
| 62 chrome_frame_test::SendVirtualKey(VK_TAB); | 62 chrome_frame_test::SendVirtualKey(VK_TAB, false); |
| 63 Sleep(100); | 63 Sleep(100); |
| 64 chrome_frame_test::SendString(password_.c_str()); | 64 chrome_frame_test::SendString(password_.c_str()); |
| 65 | 65 |
| 66 Sleep(100); | 66 Sleep(100); |
| 67 chrome_frame_test::SendVirtualKey(VK_RETURN); | 67 chrome_frame_test::SendVirtualKey(VK_RETURN, false); |
| 68 | 68 |
| 69 return true; | 69 return true; |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 BOOL SupplyProxyCredentials::EnumChildren(HWND hwnd, LPARAM param) { | 73 BOOL SupplyProxyCredentials::EnumChildren(HWND hwnd, LPARAM param) { |
| 74 if (!::IsWindowVisible(hwnd)) | 74 if (!::IsWindowVisible(hwnd)) |
| 75 return TRUE; // Ignore but continue to enumerate. | 75 return TRUE; // Ignore but continue to enumerate. |
| 76 | 76 |
| 77 DialogProps* props = reinterpret_cast<DialogProps*>(param); | 77 DialogProps* props = reinterpret_cast<DialogProps*>(param); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 | 138 |
| 139 void DialogWatchdog::OnDialogFound(HWND hwnd, const std::string& caption) { | 139 void DialogWatchdog::OnDialogFound(HWND hwnd, const std::string& caption) { |
| 140 std::vector<DialogWatchdogObserver*>::iterator it = observers_.begin(); | 140 std::vector<DialogWatchdogObserver*>::iterator it = observers_.begin(); |
| 141 while (it != observers_.end()) { | 141 while (it != observers_.end()) { |
| 142 if ((*it)->OnDialogDetected(hwnd, caption)) | 142 if ((*it)->OnDialogDetected(hwnd, caption)) |
| 143 break; | 143 break; |
| 144 it++; | 144 it++; |
| 145 } | 145 } |
| 146 } | 146 } |
| OLD | NEW |