docshell/test/browser/browser_bug234628-9.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 function test() {
     2   waitForExplicitFinish();
     4   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
     5   gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug234628-9.html");
     6   gBrowser.selectedBrowser.addEventListener("load", afterOpen, true);
     7 }
     9 function afterOpen(event) {
    10   if (event.target != gBrowser.contentDocument) {
    11     return;
    12   }
    14   gBrowser.selectedBrowser.removeEventListener("load", afterOpen, true);
    16   is(gBrowser.contentDocument.documentElement.textContent.indexOf('\u20AC'), 145, "Parent doc should be UTF-16");
    18   is(gBrowser.contentDocument.getElementsByTagName("iframe")[0].contentDocument.documentElement.textContent.indexOf('\u20AC'), 96, "Child doc should be windows-1252");
    20   gBrowser.removeCurrentTab();
    21   finish();
    22 }

mercurial