mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
17 lines
519 B
JavaScript
17 lines
519 B
JavaScript
var url = "https://example.com/browser/toolkit/content/tests/browser/file_contentTitle.html";
|
|
|
|
add_task(function*() {
|
|
let tab = gBrowser.selectedTab = gBrowser.addTab(url);
|
|
let browser = tab.linkedBrowser;
|
|
yield new Promise((resolve) => {
|
|
addEventListener("TestLocationChange", function listener() {
|
|
removeEventListener("TestLocationChange", listener);
|
|
resolve();
|
|
}, true, true);
|
|
});
|
|
|
|
is(gBrowser.contentTitle, "Test Page", "Should have the right title.");
|
|
|
|
gBrowser.removeTab(tab);
|
|
});
|