| 579 | } |
| 580 | |
| 581 | int InputManager::KeyUp(BrowserHandle browser_wrapper, |
| 582 | const Json::Value& up_action, |
| 583 | InputState* input_state) { |
| 584 | int status_code = WD_SUCCESS; |
| 585 | std::string key_value = up_action["value"].asString(); |
| 586 | std::wstring key = StringUtilities::ToWString(key_value); |
| 587 | |
| 588 | if (!this->IsSingleKey(key)) { |
| 589 | return EINVALIDARGUMENT; |
| 590 | } |
| 591 | |
| 592 | if (!this->action_simulator_->UseExtraInfo()) { |
| 593 | HWND window_handle = browser_wrapper->GetContentWindowHandle(); |
| 594 | this->AddKeyboardInput(window_handle, key, true, input_state); |
| 595 | } |
| 596 | return status_code; |
| 597 | } |
| 598 | |
| 599 | bool InputManager::IsSingleKey(const std::wstring& input) { |
| 600 | bool is_single_key = true; |
no test coverage detected