mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add crashtest for bug 257818
This commit is contained in:
parent
b5fce63981
commit
78f3fed8e8
82
content/html/content/crashtests/257818-1.html
Normal file
82
content/html/content/crashtests/257818-1.html
Normal file
@ -0,0 +1,82 @@
|
||||
<html><head>
|
||||
<script type="text/javascript">
|
||||
function cE (v) {
|
||||
return document.createElement(v)
|
||||
}
|
||||
function cTN (v) {
|
||||
return document.createTextNode(v)
|
||||
}
|
||||
|
||||
function OSXBarIcon(elt) {
|
||||
this.element = elt;
|
||||
this.labelNode = this.element.firstChild;
|
||||
this.labelNodeParent = this.element;
|
||||
this.labelNodeParent.removeChild(this.labelNode);
|
||||
|
||||
this.contents = [];
|
||||
var kids = this.element.childNodes;
|
||||
for(var i=0; i<kids.length; i++) this.contents[this.contents.length] = this.element.removeChild(kids[i]);
|
||||
this.popupSubmenu = new OSXBarSubmenu(this);
|
||||
}
|
||||
|
||||
function OSXBarSubmenu(icon) {
|
||||
this.parentIcon = icon;
|
||||
this.create();
|
||||
this.addContent();
|
||||
}
|
||||
OSXBarSubmenu.prototype = {
|
||||
create : function() {
|
||||
var p = this.popupNode = document.createElement("div");
|
||||
var b = document.getElementsByTagName("body").item(0);
|
||||
if(b) b.appendChild(p);
|
||||
this.popupNode.style.display = "none";
|
||||
// Uncomment next line to fix the problem
|
||||
// var v = document.body.offsetWidth;
|
||||
}
|
||||
};
|
||||
OSXBarSubmenu.prototype.addContent = function() {
|
||||
|
||||
// add popup label:
|
||||
var label = document.createElement("div");
|
||||
label.appendChild(document.createTextNode(this.parentIcon.label));
|
||||
this.popupNode.appendChild(label);
|
||||
|
||||
// add <li> children to the popup:
|
||||
var contents = this.parentIcon.contents;
|
||||
for(var i=0; i<contents.length; i++) {
|
||||
this.popupNode.appendChild(contents[i]);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function createControlPanel() {
|
||||
var bar = document.getElementById("navigation");
|
||||
var item = cE("li");
|
||||
item.appendChild(cTN("aaa"));
|
||||
var textfield = cE("input");
|
||||
textfield.value = 0;
|
||||
item.appendChild(textfield);
|
||||
bar.insertBefore(item, bar.firstChild);
|
||||
}
|
||||
|
||||
window.addEventListener("load", createControlPanel, false);
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function ssload() {
|
||||
new OSXBarIcon(document.getElementById("navigation").childNodes[0]);
|
||||
}
|
||||
window.addEventListener("load",ssload,false);
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ul id="navigation"></ul>
|
||||
</body></html>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
load 257818-1.html
|
||||
load 307616-1.html
|
||||
load 324918-1.xhtml
|
||||
load 338649-1.xhtml
|
||||
|
Loading…
Reference in New Issue
Block a user