1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/general/browser_bug710878.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +function test() 1.8 +{ 1.9 + waitForExplicitFinish(); 1.10 + 1.11 + let doc; 1.12 + 1.13 + gBrowser.selectedTab = gBrowser.addTab(); 1.14 + gBrowser.selectedBrowser.addEventListener("load", function onload() { 1.15 + gBrowser.selectedBrowser.removeEventListener("load", onload, true); 1.16 + doc = content.document; 1.17 + waitForFocus(performTest, content); 1.18 + }, true); 1.19 + 1.20 + content.location = "data:text/html,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>"; 1.21 + 1.22 + function performTest() 1.23 + { 1.24 + let link = doc.querySelector("a");; 1.25 + let text = gatherTextUnder(link); 1.26 + is(text, "word1 word2 word3", "Text under link is correctly computed."); 1.27 + doc = null; 1.28 + gBrowser.removeCurrentTab(); 1.29 + finish(); 1.30 + } 1.31 +} 1.32 +