Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
adding tests for bug 682681
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvold committed Jul 13, 2012
1 parent 8c5a93b commit 64b01db
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions packages/addon-kit/tests/test-tabs.js
Expand Up @@ -29,6 +29,54 @@ exports.testActiveTab_getter = function(test) {
});
};

// Bug 682681 - tab.title should never be empty
exports.testBug682681_aboutURI = function(test) {
test.waitUntilDone();

openBrowserWindow(function(window, browser) {
let tabs = require("tabs");

tabs.on('ready', function onReady(tab) {
tabs.removeListener('ready', onReady);

test.assertEqual(tab.title, "New Tab", "title of about: tab is not blank");

// end of test
closeBrowserWindow(window, function() test.done());
});

// open a about: url
tabs.open({
url: "about:blank",
inBackground: true
});
});
};

// related to Bug 682681
exports.testTitleForDataURI = function(test) {
test.waitUntilDone();

openBrowserWindow(function(window, browser) {
let tabs = require("tabs");

tabs.on('ready', function onReady(tab) {
tabs.removeListener('ready', onReady);

test.assertEqual(tab.title, "tab", "data: title is not Connecting...");

// end of test
closeBrowserWindow(window, function() test.done());
});

// open a about: url
tabs.open({
url: "data:text/html;charset=utf-8,<title>tab</title>",
inBackground: true
});
});
};

// test 'BrowserWindow' instance creation on tab 'activate' event
// See bug 648244: there was a infinite loop.
exports.testBrowserWindowCreationOnActivate = function(test) {
Expand Down

0 comments on commit 64b01db

Please sign in to comment.