Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r222256 - WebDriver: Implement commands to get and set the wind…
…ow rect https://bugs.webkit.org/show_bug.cgi?id=177134 Reviewed by Brian Burg. We are currently implementing the selenium legacy ones, we should implement the w3c ones instead. https://w3c.github.io/webdriver/webdriver-spec.html#resizing-and-positioning-windows * Session.cpp: (WebDriver::Session::getToplevelBrowsingContextRect): Helper to get the window rect. This is used by both get and set window rect commands. (WebDriver::Session::moveToplevelBrowsingContextwindow): Helper to ask automation to move the window. (WebDriver::Session::resizeToplevelBrowsingContextwindow): Helper to ask automation to resize the window. (WebDriver::Session::getWindowRect): Handle prompts and then call getToplevelBrowsingContextRect(). (WebDriver::Session::setWindowRect): Handle prompts and then move and resize the window according to the given parameters and finish the operation calling getToplevelBrowsingContextRect(). * Session.h: * WebDriverService.cpp: (WebDriver::WebDriverService::getWindowRect): Ask the session to get the window rect. (WebDriver::valueAsNumberInRange): Helper to check a value is a valid number in the given range. (WebDriver::WebDriverService::setWindowRect): Get and check size and position from parameters and then ask the session to set the window rect. * WebDriverService.h:
- Loading branch information
1 parent
4c29fe5
commit e4edc25
Showing
5 changed files
with
176 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.