forked from xml3d/xml3d.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscene-loading.js
More file actions
22 lines (21 loc) · 777 Bytes
/
Copy pathscene-loading.js
File metadata and controls
22 lines (21 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module("Scene Loading", {
setup : function() {
stop();
var that = this;
this.cb = function(e) {
ok(true, "Scene loaded");
that.doc = document.getElementById("xml3dframe").contentDocument;
start();
};
loadDocument("scenes/scene-loading.xhtml", this.cb);
},
teardown : function() {
var v = document.getElementById("xml3dframe");
v.removeEventListener("load", this.cb, true);
}
});
test("Check onload", function() {
ok(this.doc.XML3D !== undefined, "Access to XML3D object of loaded scene");
ok(this.doc.onloadCounter !== undefined, "Access to onload counter of loaded scene");
equal(this.doc.onloadCounter, 3, "Correct number of loaded xml3d elements");
});