Skip to content

Commit

Permalink
Bug 905472 - Intermittent TEST-UNEXPECTED-FAIL | tests/test-tabs.test…
Browse files Browse the repository at this point in the history
… window focus changes active tab | the activated tab url is correct. r=Mossop
  • Loading branch information
erikvold committed Aug 15, 2013
1 parent e0f8ef1 commit 3dae802
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions addon-sdk/source/test/tabs/test-firefox-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,18 +843,20 @@ exports['test window focus changes active tab'] = function(test) {
let win2 = openBrowserWindow(function() {
test.pass("window 2 is open");

tabs.on("activate", function onActivate(tab) {
tabs.removeListener("activate", onActivate);
test.pass("activate was called on windows focus change.");
test.assertEqual(tab.url, url1, 'the activated tab url is correct');

close(win2).then(function() {
test.pass('window 2 was closed');
return close(win1);
}).then(test.done.bind(test));
});
focus(win2).then(function() {
tabs.on("activate", function onActivate(tab) {
tabs.removeListener("activate", onActivate);
test.pass("activate was called on windows focus change.");
test.assertEqual(tab.url, url1, 'the activated tab url is correct');

close(win2).then(function() {
test.pass('window 2 was closed');
return close(win1);
}).then(test.done.bind(test));
});

win1.focus();
win1.focus();
});
}, "data:text/html;charset=utf-8,test window focus changes active tab</br><h1>Window #2");
}, url1);
};
Expand Down

0 comments on commit 3dae802

Please sign in to comment.