Bug 1081990 - Tests. r=gabor
authorBobby Holley <bobbyholley@gmail.com>
Sat, 18 Oct 2014 11:02:10 +0200
changeset 211114 2681f9b134c297bc70fe04ea8efb7f7ba9ede4d0
parent 211113 576bab9d7f4cb6ec00188939b4046dd925cbb8ad
child 211115 35025fd9e99b9ce21bd71709c8eb2f0ba02cac1d
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgabor
bugs1081990
milestone36.0a1
Bug 1081990 - Tests. r=gabor
js/xpconnect/tests/unit/test_bug1081990.js
js/xpconnect/tests/unit/xpcshell.ini
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_bug1081990.js
@@ -0,0 +1,10 @@
+const Cu = Components.utils;
+function run_test() {
+  var sb = new Cu.Sandbox('http://www.example.com');
+  sb.obj = {};
+  sb.arr = [];
+  sb.fun = function() {};
+  do_check_true(sb.eval('Object.getPrototypeOf(obj) == Object.prototype'));
+  do_check_true(sb.eval('Object.getPrototypeOf(arr) == null'));
+  do_check_true(sb.eval('Object.getPrototypeOf(fun) == null'));
+}
--- a/js/xpconnect/tests/unit/xpcshell.ini
+++ b/js/xpconnect/tests/unit/xpcshell.ini
@@ -47,16 +47,17 @@ support-files =
 [test_bug976151.js]
 [test_bug1001094.js]
 [test_bug1021312.js]
 [test_bug1033253.js]
 [test_bug1033920.js]
 [test_bug1033927.js]
 [test_bug1034262.js]
 [test_bug1082450.js]
+[test_bug1081990.js]
 [test_bug_442086.js]
 [test_file.js]
 [test_blob.js]
 [test_blob2.js]
 [test_file2.js]
 [test_import.js]
 [test_import_fail.js]
 [test_interposition.js]