browser_bug417483.js
Go to the documentation of this file.
1 function test() {
3 
4  var htmlContent = "data:text/html, <iframe src='data:text/html,text text'></iframe>";
5  gBrowser.addEventListener("pageshow", onPageShow, false);
6  gBrowser.loadURI(htmlContent);
7 }
8 
9 function onPageShow() {
10  gBrowser.removeEventListener("pageshow", onPageShow, false);
11  var frame = gBrowser.contentWindow.frames[0];
12  var sel = frame.getSelection();
13  var range = frame.document.createRange();
14  var tn = frame.document.body.childNodes[0];
15  range.setStart(tn , 4);
16  range.setEnd(tn , 5);
17  sel.addRange(range);
18  frame.focus();
19 
20  document.popupNode = frame.document.body;
21  var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
22  var contextMenu = new nsContextMenu(contentAreaContextMenu, gBrowser);
23 
24  ok(document.getElementById("frame-sep").hidden, "'frame-sep' should be hidden if the selection contains only spaces");
25  finish();
26 }
function test()
waitForExplicitFinish()
function nsContextMenu(aXulMenu, aBrowser)
function onPageShow()
function range(x, y)
Definition: httpd.js:138