Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | function test() { |
michael@0 | 2 | waitForExplicitFinish(); |
michael@0 | 3 | |
michael@0 | 4 | var htmlContent = "data:text/html, <iframe src='data:text/html,text text'></iframe>"; |
michael@0 | 5 | gBrowser.addEventListener("pageshow", onPageShow, false); |
michael@0 | 6 | gBrowser.loadURI(htmlContent); |
michael@0 | 7 | } |
michael@0 | 8 | |
michael@0 | 9 | function onPageShow() { |
michael@0 | 10 | gBrowser.removeEventListener("pageshow", onPageShow, false); |
michael@0 | 11 | var frame = content.frames[0]; |
michael@0 | 12 | var sel = frame.getSelection(); |
michael@0 | 13 | var range = frame.document.createRange(); |
michael@0 | 14 | var tn = frame.document.body.childNodes[0]; |
michael@0 | 15 | range.setStart(tn , 4); |
michael@0 | 16 | range.setEnd(tn , 5); |
michael@0 | 17 | sel.addRange(range); |
michael@0 | 18 | frame.focus(); |
michael@0 | 19 | |
michael@0 | 20 | document.popupNode = frame.document.body; |
michael@0 | 21 | var contentAreaContextMenu = document.getElementById("contentAreaContextMenu"); |
michael@0 | 22 | var contextMenu = new nsContextMenu(contentAreaContextMenu); |
michael@0 | 23 | |
michael@0 | 24 | ok(document.getElementById("frame-sep").hidden, "'frame-sep' should be hidden if the selection contains only spaces"); |
michael@0 | 25 | finish(); |
michael@0 | 26 | } |