diff options
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 11 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.h | 3 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_unittests.cc | 6 | ||||
-rw-r--r-- | chrome_frame/test/net/dialog_watchdog.cc | 4 |
4 files changed, 10 insertions, 14 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index bd33db6..e9786fc 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -212,16 +212,17 @@ bool SendString(const wchar_t* string) { return true; } -void SendVirtualKey(int16 key) { +void SendVirtualKey(int16 key, bool extended) { INPUT input = { INPUT_KEYBOARD }; input.ki.wVk = key; + input.ki.dwFlags = extended ? KEYEVENTF_EXTENDEDKEY : 0; SendInput(1, &input, sizeof(input)); - input.ki.dwFlags = KEYEVENTF_KEYUP; + input.ki.dwFlags = (extended ? KEYEVENTF_EXTENDEDKEY : 0) | KEYEVENTF_KEYUP; SendInput(1, &input, sizeof(input)); } void SendChar(char c) { - SendVirtualKey(VkKeyScanA(c)); + SendVirtualKey(VkKeyScanA(c), false); } void SendString(const char* s) { @@ -441,8 +442,8 @@ void ShowChromeFrameContextMenu() { void SelectAboutChromeFrame() { // Send a key up message to enable the About chrome frame option to be // selected followed by a return to select it. - chrome_frame_test::SendVirtualKey(VK_UP); - chrome_frame_test::SendVirtualKey(VK_RETURN); + SendVirtualKey(VK_UP, true); + SendVirtualKey(VK_RETURN, false); } BOOL CALLBACK FindChromeRendererWindowProc( diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h index a9e1b3a..900f532 100644 --- a/chrome_frame/test/chrome_frame_test_utils.h +++ b/chrome_frame/test/chrome_frame_test_utils.h @@ -23,7 +23,8 @@ bool SendString(const wchar_t* s); // Sends a virtual key such as VK_TAB, VK_RETURN or a character that has been // translated to a virtual key. -void SendVirtualKey(int16 key); +// The extended flag indicates if this is an extended key +void SendVirtualKey(int16 key, bool extended); // Translates a single char to a virtual key and calls SendVirtualKey. void SendChar(char c); diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc index 1d6dfe3..48d9993 100644 --- a/chrome_frame/test/chrome_frame_unittests.cc +++ b/chrome_frame/test/chrome_frame_unittests.cc @@ -1310,12 +1310,6 @@ HRESULT WebBrowserEventSink::LaunchIEAndNavigate( return S_FALSE; } - IEVersion ie_version = GetIEVersion(); - if (ie_version == IE_8) { - DLOG(INFO) << __FUNCTION__ << " Not running test on IE8"; - return S_FALSE; - } - EXPECT_TRUE(S_OK == LaunchIEAsComServer(web_browser2_.Receive())); web_browser2_->put_Visible(VARIANT_TRUE); diff --git a/chrome_frame/test/net/dialog_watchdog.cc b/chrome_frame/test/net/dialog_watchdog.cc index 27a01a0..8fd753a 100644 --- a/chrome_frame/test/net/dialog_watchdog.cc +++ b/chrome_frame/test/net/dialog_watchdog.cc @@ -59,12 +59,12 @@ bool SupplyProxyCredentials::OnDialogDetected(HWND hwnd, chrome_frame_test::SendString(username_.c_str()); Sleep(100); - chrome_frame_test::SendVirtualKey(VK_TAB); + chrome_frame_test::SendVirtualKey(VK_TAB, false); Sleep(100); chrome_frame_test::SendString(password_.c_str()); Sleep(100); - chrome_frame_test::SendVirtualKey(VK_RETURN); + chrome_frame_test::SendVirtualKey(VK_RETURN, false); return true; } |