Permalink
Browse files

FBTest: check that loads come from the right window

  • Loading branch information...
1 parent 4e26b9a commit 602964ae5b1b1aa685f2d57e2f64924d7110a71f @simonlindholm simonlindholm committed Jan 3, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/FBTest/content/FBTestFirebug.js
@@ -795,12 +795,12 @@ function waitForWindowLoad(browser, callback)
// (bug549539) could be utilized.
function waitForEvents(event)
{
- if (event.type == "load")
+ if (event.type == "load" && event.target === browser.contentDocument)
{
browser.removeEventListener("load", waitForEvents, true);
loaded = true;
}
- else if (event.type == "MozAfterPaint")
+ else if (event.type == "MozAfterPaint" && event.target === browser.contentWindow)
{
browser.removeEventListener("MozAfterPaint", waitForEvents, true);
painted = true;

0 comments on commit 602964a

Please sign in to comment.