summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/browser/browser_contentTitle.js
blob: e7966e5655ccaa690a16cb942b255745716a260a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
});