toolkit/components/viewsource/test/browser/browser_bug699356.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/viewsource/test/browser/browser_bug699356.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 + * http://creativecommons.org/publicdomain/zero/1.0/
     1.6 + */
     1.7 +
     1.8 +function test() {
     1.9 +  let source = "about:blank";
    1.10 +
    1.11 +  waitForExplicitFinish();
    1.12 +  openViewSourceWindow(source, function(aWindow) {
    1.13 +    let gBrowser = aWindow.gBrowser;
    1.14 +    let docEl = aWindow.document.documentElement;
    1.15 +
    1.16 +    is(gBrowser.contentDocument.title, source, "Correct document title");
    1.17 +    is(docEl.getAttribute("title"),
    1.18 +      "Source of: " + source + ("nsILocalFileMac" in Components.interfaces ? "" : " - " + docEl.getAttribute("titlemodifier")),
    1.19 +      "Correct window title");
    1.20 +    closeViewSourceWindow(aWindow, finish);
    1.21 +  });
    1.22 +}

mercurial