summaryrefslogtreecommitdiff
path: root/browser/base/content/test/browser_bug710878.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/test/browser_bug710878.js')
-rw-r--r--browser/base/content/test/browser_bug710878.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/browser/base/content/test/browser_bug710878.js b/browser/base/content/test/browser_bug710878.js
new file mode 100644
index 000000000..aaec82787
--- /dev/null
+++ b/browser/base/content/test/browser_bug710878.js
@@ -0,0 +1,29 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+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>";
+
+ function performTest()
+ {
+ 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();
+ }
+}
+