Improve the stability of tests run using WebDriver.

* Wait for the correct pipeline to return a LoadComplete message
  before signalling a load is complete, and ensure that the root
  pipeline is the one corresponding to the active document of the top
  level browsing context, even if this has not yet painted.

* Ensure that TakeScreenshot operates on the correct pipeline

* Reset the screenshot ready flag whenever we decide that we are ready
  to take a screenshot.
This commit is contained in:
James Graham 2015-05-22 15:58:48 +01:00
parent ec79881471
commit aa0f7a7a12
4 changed files with 42 additions and 12 deletions

View file

@ -326,7 +326,7 @@ impl MozBrowserEvent {
pub enum WebDriverCommandMsg {
LoadUrl(PipelineId, LoadData, Sender<LoadComplete>),
ScriptCommand(PipelineId, WebDriverScriptCommand),
TakeScreenshot(Sender<Option<png::Image>>)
TakeScreenshot(PipelineId, Sender<Option<png::Image>>)
}
/// Similar to net::resource_task::LoadData