2009-12-21 22:51:50 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<script>
|
|
|
|
function ok(b,m) {
|
|
|
|
return external.ok(b, m);
|
|
|
|
}
|
|
|
|
|
2014-11-28 16:19:42 +01:00
|
|
|
function broken(expr) {
|
|
|
|
return external.broken(expr);
|
|
|
|
}
|
|
|
|
|
2010-03-24 20:01:19 +01:00
|
|
|
function test_removeAttribute(e) {
|
|
|
|
ok(e.removeAttribute('nonexisting') === false, "removeAttribute('nonexisting') didn't return false");
|
|
|
|
|
|
|
|
e.title = "title";
|
|
|
|
ok(e.removeAttribute('title') === true, "removeAttribute('title') didn't return true");
|
|
|
|
ok(e.title === "", "e.title = " + e.title);
|
|
|
|
ok(("title" in e) === true, "title is not in e");
|
|
|
|
|
|
|
|
e["myattr"] = "test";
|
|
|
|
ok(e.removeAttribute('myattr') === true, "removeAttribute('myattr') didn't return true");
|
|
|
|
ok(e["myattr"] === undefined, "e['myattr'] = " + e['myattr']);
|
|
|
|
ok(("myattr" in e) === false, "myattr is in e");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-04-29 18:29:23 +02:00
|
|
|
function test_select_index() {
|
|
|
|
var s = document.getElementById("sel");
|
|
|
|
|
|
|
|
ok("0" in s, "'0' is not in s");
|
|
|
|
ok(s[0].text === "opt1", "s[0].text = " + s[0].text);
|
|
|
|
ok("1" in s, "'1 is not in s");
|
|
|
|
ok(s[1].text === "opt2", "s[1].text = " + s[1].text);
|
|
|
|
ok("2" in s, "'2' is in s");
|
|
|
|
ok(s[2] === null, "s[2] = " + s[2]);
|
|
|
|
}
|
|
|
|
|
2010-11-14 14:42:33 +01:00
|
|
|
function test_createDocumentFragment() {
|
|
|
|
var fragment = document.createDocumentFragment();
|
|
|
|
|
|
|
|
ok(typeof(fragment) === "object", "typeof(fragmend) = " + typeof(fragment));
|
2010-11-14 14:42:43 +01:00
|
|
|
ok(fragment.nodeType === 11, "fragment.nodeType = " + fragment.nodeType);
|
2010-11-14 14:42:33 +01:00
|
|
|
ok(fragment.nodeName === "#document-fragment", "fragment.nodeName = " + fragment.nodeName);
|
2010-11-14 14:43:18 +01:00
|
|
|
|
|
|
|
var cloned = fragment.cloneNode(true);
|
|
|
|
ok(cloned.nodeType === 11, "cloned.nodeType = " + cloned.nodeType);
|
|
|
|
ok(cloned.nodeName === "#document-fragment", "cloned.nodeName = " + cloned.nodeName);
|
2010-11-14 14:42:33 +01:00
|
|
|
}
|
|
|
|
|
2011-05-31 12:19:04 +02:00
|
|
|
function test_document_name_as_index() {
|
|
|
|
document.body.innerHTML = '<form name="formname"></form>';
|
|
|
|
var e = document.getElementById("formname");
|
|
|
|
ok(!!e, "e is null");
|
|
|
|
|
|
|
|
ok(document.formname === e, "document.formname != getElementById('formname')");
|
|
|
|
ok("formname" in document, "formname' is not in document");
|
|
|
|
|
|
|
|
document.body.removeChild(e);
|
|
|
|
|
|
|
|
ok(document.formname === undefined, "document.formname is not undefined");
|
|
|
|
ok(!("formname" in document), "formname' is in document");
|
|
|
|
|
|
|
|
document.body.innerHTML = '<form id="formid"></form>';
|
|
|
|
var e = document.getElementById("formid");
|
|
|
|
ok(!!e, "e is null");
|
|
|
|
ok(!("formid" in document), "formid is in document");
|
2012-04-17 12:10:48 +02:00
|
|
|
|
|
|
|
document.body.innerHTML = '<form name="formname"></form>';
|
|
|
|
ok("formname" in window, "formname' is not in window");
|
|
|
|
ok(typeof(window.formname) === "object", "typeof(window.formname) = " + typeof(window.formname));
|
|
|
|
window.formname = 1;
|
|
|
|
ok(window.formname === 1, "window.formname = " + window.formname);
|
|
|
|
formname = 2;
|
|
|
|
ok(window.formname === 2, "window.formname = " + window.formname);
|
2012-09-04 13:58:39 +02:00
|
|
|
|
|
|
|
document.body.innerHTML = '<iframe id="iframeid"></iframe>';
|
|
|
|
ok("iframeid" in window, "iframeid is not in window");
|
|
|
|
e = document.getElementById("iframeid");
|
|
|
|
ok(!!e, "e is null");
|
|
|
|
ok(iframeid != e, "iframeid == e");
|
|
|
|
ok(iframeid.frameElement === e, "frameid != e.contentWindow");
|
2011-05-31 12:19:04 +02:00
|
|
|
}
|
|
|
|
|
2012-04-16 13:49:22 +02:00
|
|
|
function test_remove_style_attribute() {
|
|
|
|
var s = document.body.style, b;
|
|
|
|
|
|
|
|
s.somevar = "test";
|
|
|
|
b = s.removeAttribute("somevar", 1);
|
|
|
|
ok(b, "removeAttribute returned " + b + " expected true");
|
|
|
|
b = s.removeAttribute("somevar", 1);
|
|
|
|
ok(b === false, "removeAttribute returned " + b + " expected false");
|
|
|
|
}
|
|
|
|
|
2012-04-18 15:26:12 +02:00
|
|
|
function test_clone_node() {
|
|
|
|
var elem, cloned;
|
|
|
|
|
|
|
|
elem = document.getElementById("divid");
|
|
|
|
elem.style.filter = "alpha(opacity=50)";
|
|
|
|
ok(elem.style.filter === "alpha(opacity=50)", "elem.style.filter = " + elem.style.filter);
|
|
|
|
|
|
|
|
cloned = elem.cloneNode(true);
|
|
|
|
ok(cloned.style.filter === "alpha(opacity=50)", "cloned.style.filter = " + cloned.style.filter);
|
|
|
|
}
|
|
|
|
|
2014-11-28 16:19:42 +01:00
|
|
|
function test_attrs() {
|
|
|
|
var input, s, x, f, b;
|
2012-09-24 14:10:33 +02:00
|
|
|
|
|
|
|
document.body.innerHTML = '<input id="inputid"></input>';
|
|
|
|
input = document.getElementById("inputid");
|
2014-11-28 16:19:42 +01:00
|
|
|
s = input.style;
|
|
|
|
f = input.fireEvent;
|
2012-09-24 14:10:33 +02:00
|
|
|
ok(input.checked === false, "input.checked = " + input.checked);
|
|
|
|
|
|
|
|
input.setAttribute("checked", "test");
|
|
|
|
ok(input.checked === true, "input.checked = " + input.checked);
|
|
|
|
|
|
|
|
input.setAttribute("checked", 0);
|
|
|
|
ok(input.checked === false, "input.checked = " + input.checked);
|
|
|
|
|
|
|
|
input.setAttribute("checked", "");
|
|
|
|
ok(input.checked === false, "input.checked = " + input.checked);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
input.setAttribute("Checked", 1, 0);
|
|
|
|
ok(input.checked === true, "input.checked = " + input.checked);
|
|
|
|
ok(!("Checked" in input), "Checked added to input");
|
|
|
|
|
|
|
|
input.setAttribute("checked", 0, 0);
|
|
|
|
input.setAttribute("Checked", 1, 1);
|
|
|
|
ok(input.checked === false, "input.checked = " + input.checked);
|
|
|
|
ok("Checked" in input, "checked not added to input");
|
|
|
|
ok(input.Checked === 1, "input.Checked = " + input.Checked);
|
|
|
|
|
|
|
|
input.removeAttribute("Checked", 1);
|
|
|
|
ok(!("Checked" in input), "Checked is still in input");
|
|
|
|
ok(input.checked === false, "input.checked = " + input.checked);
|
|
|
|
|
|
|
|
input.setAttribute("checked", 1, 0);
|
|
|
|
input.setAttribute("Checked", 0);
|
|
|
|
ok(input.checked === true, "input.checked = " + input.checked);
|
|
|
|
ok("Checked" in input, "checked not added to input");
|
|
|
|
ok(input.Checked === 0, "input.Checked = " + input.Checked);
|
|
|
|
|
|
|
|
input.setAttribute("Checked", 2, 2);
|
|
|
|
ok(input.Checked === 0, "input.Checked = " + input.Checked);
|
|
|
|
input.setAttribute("Checked", 3, 3);
|
|
|
|
ok(input.Checked === 3, "input.Checked = " + input.Checked);
|
|
|
|
|
|
|
|
x = input.getAttribute("style");
|
|
|
|
ok(x === s, "getAttribute('style') = " + x);
|
|
|
|
ok(s.cssText === "", "s.cssText = " + s.cssText);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("style", 2);
|
|
|
|
ok(x === "", "getAttribute('style') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
input.setAttribute("style", "display: none");
|
|
|
|
x = input.getAttribute("style");
|
|
|
|
ok(x === s, "getAttribute('style') = " + x);
|
|
|
|
ok(s.cssText === "", "s.cssText = " + s.cssText);
|
|
|
|
ok(s.display === "", "s.display = " + s.display);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("style", 2);
|
|
|
|
ok(x === "", "getAttribute('style') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
s.display = "none";
|
|
|
|
ok(s.cssText != "", "s.cssText = " + s.cssText);
|
|
|
|
ok(s.display === "none", "s.display = " + s.display);
|
|
|
|
input.setAttribute("style", "");
|
|
|
|
x = input.getAttribute("style");
|
|
|
|
ok(x === s, "getAttribute('style') = " + x);
|
|
|
|
ok(s.cssText != "", "s.cssText = " + s.cssText);
|
|
|
|
ok(s.display === "none", "s.display = " + s.display);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("style", 2);
|
|
|
|
ok(x === "", "getAttribute('style') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
input.setAttribute("style", null);
|
|
|
|
x = input.getAttribute("style");
|
|
|
|
ok(input.style === s, "input.style = " + input.style);
|
|
|
|
ok(x === s, "getAttribute('style') = " + x);
|
|
|
|
ok(s.cssText != "", "s.cssText = " + s.cssText);
|
|
|
|
ok(s.display === "none", "s.display = " + s.display);
|
|
|
|
|
|
|
|
x = input.getAttribute("fireEvent");
|
|
|
|
ok(x === input.fireEvent, "input.getAttribute('fireEvent') = " + x);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("fireEvent", 2);
|
|
|
|
ok(x === "", "getAttribute('fireEvent') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
input.setAttribute("fireEvent", 3);
|
|
|
|
ok(input.fireEvent === 3, "input.fireEvent = " + input.fireEvent);
|
|
|
|
x = input.getAttribute("fireEvent");
|
|
|
|
ok(x === 3, "input.getAttribute('fireEvent') = " + x);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("fireEvent", 2);
|
|
|
|
ok(x === "3", "getAttribute('fireEvent') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
|
|
|
|
b = input.removeAttribute("style");
|
|
|
|
ok(b === true, "removeAttribute('style') failed");
|
|
|
|
ok(input.style === s, "input.style = " + input.style);
|
|
|
|
x = input.getAttribute("style");
|
|
|
|
ok(x === s, "getAttribute('style') = " + x);
|
|
|
|
ok(s.display === "", "s.display = " + s.display);
|
|
|
|
ok(s.cssText === "", "s.cssText = " + s.cssText);
|
2014-12-01 12:55:51 +01:00
|
|
|
x = input.getAttribute("style", 2);
|
|
|
|
ok(x === "", "getAttribute('style') = " + x);
|
2014-11-28 16:19:42 +01:00
|
|
|
b = input.removeAttribute("style");
|
|
|
|
ok(b === true, "removeAttribute('style') failed");
|
|
|
|
|
|
|
|
b = false;
|
|
|
|
try {
|
|
|
|
input.setAttribute("tagName", "xxx");
|
|
|
|
}catch(e) {
|
|
|
|
b = true;
|
|
|
|
}
|
|
|
|
ok(b, "Expected exception on setAttribute(tagName)");
|
|
|
|
|
|
|
|
b = false;
|
|
|
|
try {
|
|
|
|
input.setAttribute("parentElement", "xxx");
|
|
|
|
}catch(e) {
|
|
|
|
b = true;
|
|
|
|
}
|
|
|
|
ok(b, "Expected exception on setAttribute(parentElement)");
|
|
|
|
|
|
|
|
b = input.removeAttribute("fireEvent");
|
|
|
|
ok(b === true, "removeAttribute(fireEvent) failed");
|
|
|
|
ok(input.fireEvent === f, "input.fireEvent = " + input.fireEvent);
|
|
|
|
x = input.getAttribute("fireEvent");
|
|
|
|
ok(x === f, "input.getAttribute('fireEvent') = " + x);
|
|
|
|
b = input.removeAttribute("fireEvent");
|
|
|
|
ok(b === false || broken(b === true), "removeAttribute(fireEvent) returned " + b);
|
|
|
|
|
|
|
|
input.fireEvent = 3;
|
|
|
|
x = input.getAttribute("fireEvent");
|
|
|
|
ok(x === 3, "input.getAttribute('fireEvent') = " + x);
|
|
|
|
ok(input.fireEvent === 3, "input.fireEvent' = " + input.fireEvent);
|
2012-10-22 11:59:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function test_attribute_collection() {
|
|
|
|
var div, attr;
|
|
|
|
|
|
|
|
document.body.innerHTML = '<div id="divid" class="test"></div>';
|
|
|
|
div = document.getElementById("divid");
|
2012-09-24 14:10:33 +02:00
|
|
|
|
2012-10-22 11:59:10 +02:00
|
|
|
attr = div.attributes["dir"];
|
|
|
|
ok(attr === div.attributes["dir"], "attr !== div.attributes['dir']");
|
2012-09-24 14:10:33 +02:00
|
|
|
}
|
|
|
|
|
2012-07-13 14:46:55 +02:00
|
|
|
function test_getter_call() {
|
|
|
|
document.body.innerHTML = '<div id="divid"></div>';
|
|
|
|
|
|
|
|
var e = document.getElementById("divid");
|
|
|
|
|
2012-09-24 14:10:19 +02:00
|
|
|
e.myfunc = function(x) { this.myfunc_called = x; };
|
2012-07-13 14:46:55 +02:00
|
|
|
e.myfunc("test");
|
2012-09-24 14:10:19 +02:00
|
|
|
ok(e.myfunc_called === "test", "e.myfunc_called = " + e.myfunc_called);
|
2012-07-13 14:46:55 +02:00
|
|
|
|
|
|
|
e.onmousedown = function(x) { this.onmousedown_called = x; };
|
|
|
|
e.onmousedown("test");
|
|
|
|
ok(e.onmousedown_called === "test", "e.onmousedown_called = " + e.onmousedown_called);
|
2013-04-01 11:50:29 +02:00
|
|
|
|
|
|
|
ok(document.all("divid").tagName === "DIV", "document.all('divid').tagName = " + document.all("divid").tagName);
|
2012-07-13 14:46:55 +02:00
|
|
|
}
|
|
|
|
|
2012-12-04 15:06:37 +01:00
|
|
|
function test_arg_conv() {
|
|
|
|
/* this call would throw if the argument wasn't converted by JScript */
|
|
|
|
window.clearInterval("");
|
|
|
|
|
|
|
|
navigator.javaEnabled();
|
|
|
|
}
|
|
|
|
|
2012-09-24 14:10:19 +02:00
|
|
|
function test_override_functions() {
|
|
|
|
function override_func() { return "test"; }
|
|
|
|
|
|
|
|
ok(typeof(window.showModalDialog) === "object", "typeof(window.showModalDialog) = " + typeof(window.showModalDialog));
|
|
|
|
window.showModalDialog = override_func;
|
|
|
|
ok(window.showModalDialog === override_func, "window.showModalDialog != override_func");
|
|
|
|
ok(typeof(window.showModalDialog) === "function", "typeof(window.showModalDialog) = " + typeof(window.showModalDialog));
|
|
|
|
|
|
|
|
document.body.innerHTML = '<div id="divid"></div>';
|
|
|
|
var div = document.getElementById("divid");
|
|
|
|
ok(typeof(div.addBehavior) === "object", "typeof(div.addBehavior) = " + typeof(div.addBehavior));
|
|
|
|
div.addBehavior = override_func;
|
|
|
|
ok(div.addBehavior === override_func, "div.addBehavior != override_func");
|
|
|
|
ok(typeof(div.addBehavior) === "function", "typeof(div.addBehavior) = " + typeof(div.addBehavior));
|
|
|
|
|
|
|
|
var tmp = div.addBehavior();
|
|
|
|
ok(tmp === "test", "div.addBehavior() = " + tmp);
|
2014-06-02 15:45:13 +02:00
|
|
|
|
|
|
|
tmp = String(div.attachEvent);
|
|
|
|
ok(tmp == "\nfunction attachEvent() {\n [native code]\n}\n", "String(div.attachEvent) = " + tmp);
|
2012-09-24 14:10:19 +02:00
|
|
|
}
|
|
|
|
|
2013-01-16 12:36:08 +01:00
|
|
|
function test_forin() {
|
|
|
|
var cnt=0;
|
|
|
|
|
|
|
|
document.body.innerHTML = '<a id="aid"></a>';
|
|
|
|
|
|
|
|
for(var x in document.getElementById("aid")) {
|
|
|
|
cnt++;
|
|
|
|
}
|
|
|
|
|
|
|
|
ok(cnt > 100, "cnt = " + cnt);
|
|
|
|
}
|
|
|
|
|
2013-05-17 12:34:59 +02:00
|
|
|
function test_customtag() {
|
|
|
|
document.body.innerHTML = 'test<unk><br>';
|
|
|
|
|
|
|
|
var children = document.body.childNodes;
|
|
|
|
|
|
|
|
ok(children.length === 3, "children.length = " + children.length);
|
|
|
|
ok(children[0].data === "test", "children[0].data = " + children[0].data);
|
|
|
|
ok(children[1].tagName === "UNK", "children[1].tagName = " + children[1].tagName);
|
|
|
|
ok(children[2].tagName === "BR", "children[2].tagName = " + children[2].tagName);
|
|
|
|
}
|
|
|
|
|
2013-05-17 12:35:08 +02:00
|
|
|
function test_whitespace_nodes() {
|
|
|
|
document.body.innerHTML = '<table id="tid"> <tr> \t<td>\n \t<div></div> </td>\n </tr> </table>';
|
|
|
|
|
|
|
|
var t = document.getElementById("tid");
|
|
|
|
ok(t.childNodes.length === 1, "t.childNodes.length = " + t.childNodes.length);
|
|
|
|
ok(t.childNodes[0].tagName === "TBODY", "t.childNodes[0].tagName = " + t.childNodes[0].tagName);
|
|
|
|
|
|
|
|
var row = t.rows[0];
|
|
|
|
ok(row.childNodes.length === 1, "row.childNodes.length = " + row.childNodes.length);
|
|
|
|
ok(row.childNodes[0].tagName === "TD", "row.childNodes[0].tagName = " + row.childNodes[0].tagName);
|
|
|
|
|
|
|
|
var cell = row.cells[0];
|
|
|
|
ok(cell.childNodes.length === 1, "cell.childNodes.length = " + cell.childNodes.length);
|
|
|
|
|
|
|
|
|
|
|
|
document.body.innerHTML = '<table id="tid"> x<tr> \tx<td>\n \tx<div></div> </td>\n </tr> </table>';
|
|
|
|
|
|
|
|
t = document.getElementById("tid");
|
|
|
|
ok(t.rows[0].cells[0].childNodes.length === 2,
|
|
|
|
"t.rows[0].cells[0].childNodes.length = " + t.rows[0].cells[0].childNodes.length);
|
|
|
|
}
|
|
|
|
|
2014-10-10 18:03:11 +02:00
|
|
|
function test_language_attribute() {
|
|
|
|
document.body.innerHTML = '<div id="did" language="test"></div>';
|
|
|
|
var elem = document.getElementById("did");
|
|
|
|
ok(elem.language === "test", "elem.language = " + elem.language);
|
|
|
|
elem.language = 1;
|
|
|
|
ok(elem.language === "1", "elem.language = " + elem.language);
|
|
|
|
}
|
|
|
|
|
2014-12-21 16:32:48 +01:00
|
|
|
function test_text_node() {
|
|
|
|
document.body.innerHTML = 'testing text';
|
|
|
|
var text = document.body.childNodes[0], text2;
|
|
|
|
ok(text.data == "testing text", "text.data = " + text.data);
|
|
|
|
|
|
|
|
text2 = text.splitText(7);
|
|
|
|
ok(text.data == "testing", "text.data = " + text.data);
|
|
|
|
ok(text2.data == " text", "text2.data = " + text2.data);
|
|
|
|
ok(text.nextSibling === text2, "text.nextSibling !== text2");
|
|
|
|
|
|
|
|
text2 = text.splitText(0);
|
|
|
|
ok(text.data == "", "text.data = " + text.data);
|
|
|
|
ok(text2.data == "testing", "text2.data = " + text2.data);
|
|
|
|
}
|
|
|
|
|
2016-02-24 15:21:24 +01:00
|
|
|
function test_xhr() {
|
|
|
|
ok("XMLHttpRequest" in window, "XMLHttpRequest not found in window object\n");
|
|
|
|
ok(typeof(XMLHttpRequest) === "object", "typeof(XMLHttpRequest) = " + typeof(XMLHttpRequest));
|
|
|
|
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
ok(typeof(xhr) === "object", "typeof(xhr) = " + typeof(xhr));
|
|
|
|
}
|
|
|
|
|
2010-11-09 13:36:39 +01:00
|
|
|
var globalVar = false;
|
|
|
|
|
2012-09-24 14:10:33 +02:00
|
|
|
function runTests() {
|
2009-12-21 22:51:50 +01:00
|
|
|
obj = new Object();
|
|
|
|
ok(obj === window.obj, "obj !== window.obj");
|
|
|
|
|
|
|
|
ok(typeof(divid) === "object", "typeof(divid) = " + typeof(divid));
|
|
|
|
|
2010-03-24 20:01:19 +01:00
|
|
|
test_removeAttribute(document.getElementById("divid"));
|
|
|
|
test_removeAttribute(document.body);
|
2010-04-29 18:29:23 +02:00
|
|
|
test_select_index();
|
2012-04-18 15:26:12 +02:00
|
|
|
test_clone_node();
|
2010-11-14 14:42:33 +01:00
|
|
|
test_createDocumentFragment();
|
2011-05-31 12:19:04 +02:00
|
|
|
test_document_name_as_index();
|
2012-04-16 13:49:22 +02:00
|
|
|
test_remove_style_attribute();
|
2012-07-13 14:46:55 +02:00
|
|
|
test_getter_call();
|
2014-11-28 16:19:42 +01:00
|
|
|
test_attrs();
|
2012-10-22 11:59:10 +02:00
|
|
|
test_attribute_collection();
|
2012-12-04 15:06:37 +01:00
|
|
|
test_arg_conv();
|
2012-09-24 14:10:19 +02:00
|
|
|
test_override_functions();
|
2013-01-16 12:36:08 +01:00
|
|
|
test_forin();
|
2013-05-17 12:34:59 +02:00
|
|
|
test_customtag();
|
2013-05-17 12:35:08 +02:00
|
|
|
test_whitespace_nodes();
|
2014-10-10 18:03:11 +02:00
|
|
|
test_language_attribute();
|
2014-12-21 16:32:48 +01:00
|
|
|
test_text_node();
|
2016-02-24 15:21:24 +01:00
|
|
|
test_xhr();
|
2010-03-24 20:01:19 +01:00
|
|
|
|
2010-11-09 13:36:39 +01:00
|
|
|
var r = window.execScript("globalVar = true;");
|
|
|
|
ok(r === undefined, "execScript returned " + r);
|
|
|
|
ok(globalVar === true, "globalVar = " + globalVar);
|
2015-11-20 13:15:56 +01:00
|
|
|
|
|
|
|
/* Call setTimeout without specified time. */
|
|
|
|
window.setTimeout(function() { external.reportSuccess(); });
|
2012-09-24 14:10:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function runTest() {
|
|
|
|
try {
|
|
|
|
runTests();
|
|
|
|
}catch(e) {
|
2014-08-07 02:30:21 +02:00
|
|
|
ok(false, "got exception " + e.message);
|
2012-09-24 14:10:33 +02:00
|
|
|
}
|
2009-12-21 22:51:50 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<body onload="runTest();">
|
|
|
|
<div id="divid"></div>
|
2010-04-29 18:29:23 +02:00
|
|
|
<select id="sel">
|
|
|
|
<option>opt1</option>
|
|
|
|
<option>opt2</option>
|
|
|
|
</select>
|
2009-12-21 22:51:50 +01:00
|
|
|
</body>
|
|
|
|
</html>
|