Bug 1017156 - Fix tests for blank tab name now expected in TabOpen event. r=dao

This commit is contained in:
Brian R. Bondy 2014-06-24 09:45:38 -04:00
Родитель 0a3f260a5d
Коммит 65453653d0
1 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -372,16 +372,10 @@ function test18a() {
var updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
ok(updateLink.style.visibility != "hidden", "Test 18a, Plugin should have an update link");
var tabOpenListener = new TabOpenListener(Services.urlFormatter.formatURLPref("plugins.update.url"), false, false);
tabOpenListener.handleEvent = function(event) {
if (event.type == "TabOpen") {
gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
this.tab = event.originalTarget;
is(event.target.label, this.url, "Test 18a, Update link should open up the plugin check page");
gBrowser.removeTab(this.tab);
test18b();
}
};
var pluginUpdateURL = Services.urlFormatter.formatURLPref("plugins.update.url");
var tabOpenListener = new TabOpenListener(pluginUpdateURL, function(tab) {
gBrowser.removeTab(tab);
}, test18b);
EventUtils.synthesizeMouseAtCenter(updateLink, {}, gTestBrowser.contentWindow);
}