gecko/js/ipc/tests/unit/cpow_child.js
Ben Newman 9b5dc10c32 Bug 565078 - Move js/src/ipc to js/ipc. r=bsmedberg
--HG--
rename : js/src/ipc/CPOWTypes.h => js/ipc/CPOWTypes.h
rename : js/src/ipc/ContextWrapperChild.h => js/ipc/ContextWrapperChild.h
rename : js/src/ipc/ContextWrapperParent.h => js/ipc/ContextWrapperParent.h
rename : js/src/ipc/Makefile.in => js/ipc/Makefile.in
rename : js/src/ipc/ObjectWrapperChild.cpp => js/ipc/ObjectWrapperChild.cpp
rename : js/src/ipc/ObjectWrapperChild.h => js/ipc/ObjectWrapperChild.h
rename : js/src/ipc/ObjectWrapperParent.cpp => js/ipc/ObjectWrapperParent.cpp
rename : js/src/ipc/ObjectWrapperParent.h => js/ipc/ObjectWrapperParent.h
rename : js/src/ipc/PContextWrapper.ipdl => js/ipc/PContextWrapper.ipdl
rename : js/src/ipc/PObjectWrapper.ipdl => js/ipc/PObjectWrapper.ipdl
rename : js/src/ipc/ipdl.mk => js/ipc/ipdl.mk
rename : js/src/ipc/jar.mn => js/ipc/jar.mn
rename : js/src/ipc/tests/Makefile.in => js/ipc/tests/Makefile.in
rename : js/src/ipc/tests/adhoc/child.html => js/ipc/tests/adhoc/child.html
rename : js/src/ipc/tests/adhoc/test.xul => js/ipc/tests/adhoc/test.xul
rename : js/src/ipc/tests/unit/cpow_child.js => js/ipc/tests/unit/cpow_child.js
rename : js/src/ipc/tests/unit/test_cpow.js => js/ipc/tests/unit/test_cpow.js
2010-05-11 10:44:42 -07:00

67 lines
1.1 KiB
JavaScript

var data = {
answer: 42,
nested: { objects: { work: "yes they do" } },
arr: [
"zeroeth",
{ foo: "bar" },
function() { return data },
{ toString: function() { return "last" } }
],
toString: function() {
return "CPOW";
}
};
var empty = function() {
this.try_to_delete = "just try";
};
empty.prototype = {
try_to_delete: "bwahaha",
inherited: "inherited",
method: function() {
return "called"
}
};
data.derived = new empty;
(data.constructor = function(value) {
var self = this;
this.value = value;
this.check = function(that) {
do_check_eq(this.value, that.value);
do_check_eq(this, self);
do_check_eq(this, that);
do_check_false(this.isGlobal());
};
}).prototype = {
isGlobal: function() {
return (function() { return this })() == this;
}
};
function A() {
this.a = A;
this.b = A;
}
function B() {
this.b = B;
this.c = B;
}
B.prototype = new A;
function pitch(ball) {
throw ball;
}
get_set = {
get foo() { return 42; },
get foo_throws() { throw "BAM"; },
set one(val) { this.two = val + 1; }
};
function type(x) {
return typeof x;
}
function run_test() {}