Auto merge of #11179 - asajeffrey:webdriver-resize-window, r=jgraham

Implemented webdriver SetWindowSize.

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #10467 (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the new tests are in https://github.com/w3c/web-platform-tests/pull/3024

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11179)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-23 02:53:48 -07:00
commit 2063bde0a4
9 changed files with 61 additions and 26 deletions

View file

@ -1045,8 +1045,6 @@ impl ScriptThread {
webdriver_handlers::handle_get_frame_id(&context, pipeline_id, frame_id, reply),
WebDriverScriptCommand::GetUrl(reply) =>
webdriver_handlers::handle_get_url(&context, pipeline_id, reply),
WebDriverScriptCommand::GetWindowSize(reply) =>
webdriver_handlers::handle_get_window_size(&context, pipeline_id, reply),
WebDriverScriptCommand::IsEnabled(element_id, reply) =>
webdriver_handlers::handle_is_enabled(&context, pipeline_id, element_id, reply),
WebDriverScriptCommand::IsSelected(element_id, reply) =>

View file

@ -30,7 +30,7 @@ use ipc_channel::ipc::IpcSender;
use js::jsapi::JSContext;
use js::jsapi::{HandleValue, RootedValue};
use js::jsval::UndefinedValue;
use msg::constellation_msg::{PipelineId, WindowSizeData};
use msg::constellation_msg::PipelineId;
use msg::webdriver_msg::{WebDriverFrameId, WebDriverJSError, WebDriverJSResult, WebDriverJSValue};
use script_thread::get_browsing_context;
use url::Url;
@ -282,14 +282,6 @@ pub fn handle_get_url(context: &BrowsingContext,
reply.send((*url).clone()).unwrap();
}
pub fn handle_get_window_size(context: &BrowsingContext,
_pipeline: PipelineId,
reply: IpcSender<Option<WindowSizeData>>) {
let window = context.active_window();
let size = window.window_size();
reply.send(size).unwrap();
}
pub fn handle_is_enabled(context: &BrowsingContext,
pipeline: PipelineId,
element_id: String,