Bug 1156939 - don't stash a reference to a CPOW and then spin the event loop. r=mconley

This commit is contained in:
Blake Kaplan 2015-04-23 13:24:56 -07:00
parent 0df6240241
commit 715034e51d

View File

@ -5,23 +5,20 @@ function test()
{
waitForExplicitFinish();
let doc;
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onload() {
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
doc = content.document;
waitForFocus(performTest, content);
}, true);
content.location = "data:text/html,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
content.location = "data:text/html;charset=utf-8,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
function performTest()
{
let doc = content.document;
let link = doc.querySelector("a");;
let text = gatherTextUnder(link);
is(text, "word1 word2 word3", "Text under link is correctly computed.");
doc = null;
gBrowser.removeCurrentTab();
finish();
}