2009-09-14 08:19:58 -07:00
|
|
|
function test() {
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
var htmlContent = "data:text/html, <iframe src='data:text/html,text text'></iframe>";
|
|
|
|
gBrowser.addEventListener("pageshow", onPageShow, false);
|
|
|
|
gBrowser.loadURI(htmlContent);
|
|
|
|
}
|
|
|
|
|
|
|
|
function onPageShow() {
|
|
|
|
gBrowser.removeEventListener("pageshow", onPageShow, false);
|
2009-09-18 04:52:28 -07:00
|
|
|
var frame = content.frames[0];
|
2009-09-14 08:19:58 -07:00
|
|
|
var sel = frame.getSelection();
|
|
|
|
var range = frame.document.createRange();
|
|
|
|
var tn = frame.document.body.childNodes[0];
|
|
|
|
range.setStart(tn , 4);
|
|
|
|
range.setEnd(tn , 5);
|
|
|
|
sel.addRange(range);
|
|
|
|
frame.focus();
|
|
|
|
|
|
|
|
document.popupNode = frame.document.body;
|
|
|
|
var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
|
2013-01-27 10:31:14 -08:00
|
|
|
var contextMenu = new nsContextMenu(contentAreaContextMenu);
|
2009-09-14 08:19:58 -07:00
|
|
|
|
|
|
|
ok(document.getElementById("frame-sep").hidden, "'frame-sep' should be hidden if the selection contains only spaces");
|
|
|
|
finish();
|
|
|
|
}
|