diff options
author | James Graham <james@hoppipolla.co.uk> | 2015-04-28 18:16:23 +0100 |
---|---|---|
committer | James Graham <james@hoppipolla.co.uk> | 2015-05-14 10:59:10 +0100 |
commit | 28ac0abf6a1aeb8540d1b41526c0fccffa749ce9 (patch) | |
tree | 96383acf89c717f3ad3756865c6a515dba45758d /components/script/script_task.rs | |
parent | 7e022b25a8ab87897180dcf1b6aff8d9b57adcb4 (diff) | |
download | servo-28ac0abf6a1aeb8540d1b41526c0fccffa749ce9.tar.gz servo-28ac0abf6a1aeb8540d1b41526c0fccffa749ce9.zip |
Make WebDriver Get() command wait on pages loading before returning.
This makes using WebDriver significantly less racy. Also
refactors the message structure a little
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index c9d92497a04..df838f130e8 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -726,7 +726,7 @@ impl ScriptTask { self.handle_update_subpage_id(containing_pipeline_id, old_subpage_id, new_subpage_id), ConstellationControlMsg::FocusIFrame(containing_pipeline_id, subpage_id) => self.handle_focus_iframe_msg(containing_pipeline_id, subpage_id), - ConstellationControlMsg::WebDriverCommand(pipeline_id, msg) => + ConstellationControlMsg::WebDriverScriptCommand(pipeline_id, msg) => self.handle_webdriver_msg(pipeline_id, msg), ConstellationControlMsg::TickAllAnimations(pipeline_id) => self.handle_tick_all_animations(pipeline_id), @@ -801,8 +801,8 @@ impl ScriptTask { fn handle_webdriver_msg(&self, pipeline_id: PipelineId, msg: WebDriverScriptCommand) { let page = self.root_page(); match msg { - WebDriverScriptCommand::EvaluateJS(script, reply) => - webdriver_handlers::handle_evaluate_js(&page, pipeline_id, script, reply), + WebDriverScriptCommand::ExecuteScript(script, reply) => + webdriver_handlers::handle_execute_script(&page, pipeline_id, script, reply), WebDriverScriptCommand::FindElementCSS(selector, reply) => webdriver_handlers::handle_find_element_css(&page, pipeline_id, selector, reply), WebDriverScriptCommand::FindElementsCSS(selector, reply) => |