Skip to content

Commit

Permalink
Bug 1299631 - Avoid accessing dead windows in test-firefox-windows.js…
Browse files Browse the repository at this point in the history
…. r=zer0

Rather than checking for window.closed we can just check the number of active
windows.
  • Loading branch information
EricRahm committed Sep 1, 2016
1 parent 1fccae2 commit cf54d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon-sdk/source/test/windows/test-firefox-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ exports.testActiveWindow = function*(assert) {
assert.equal(windows.activeWindow.title, window3.title, "Correct active window - 3");

yield close(rawWindow2);
assert.equal(rawWindow2.closed, true, 'window 2 is closed');

yield close(rawWindow3);
assert.equal(rawWindow3.closed, true, 'window 3 is closed');

assert.equal(windows.length, 1, "Correct number of browser windows");
assert.equal(window.closed, false, "Original window is still open");
};

exports.testTrackWindows = function(assert, done) {
Expand Down

0 comments on commit cf54d6c

Please sign in to comment.