Bug 851895 - Tests. r=mrbkap
authorBobby Holley <bobbyholley@gmail.com>
Thu, 21 Mar 2013 08:20:46 -0700
changeset 125823 dc052939828763df406f53df40edf877238d468f
parent 125822 1653ada4e2510d587ea005551848fec7f6a87e78
child 125824 c5ad6568024ddf6f05564db733f43037f16486df
push id25109
push userryanvm@gmail.com
push dateThu, 21 Mar 2013 19:52:05 +0000
treeherdermozilla-inbound@a83cbe4e0576 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs851895
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 851895 - Tests. r=mrbkap
js/xpconnect/tests/unit/test_bug851895.js
js/xpconnect/tests/unit/xpcshell.ini
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_bug851895.js
@@ -0,0 +1,11 @@
+const Cu = Components.utils;
+
+function run_test() {
+  // Make sure Components.utils gets its |this| fixed up.
+  var isXrayWrapper = Components.utils.isXrayWrapper;
+  do_check_true(!isXrayWrapper({}), "Didn't throw");
+
+  // Even for classes without |this| fixup, make sure that we don't crash.
+  var isSuccessCode = Components.isSuccessCode;
+  try { isSuccessCode(Components.results.NS_OK); } catch (e) {};
+}
--- a/js/xpconnect/tests/unit/xpcshell.ini
+++ b/js/xpconnect/tests/unit/xpcshell.ini
@@ -13,16 +13,17 @@ tail =
 [test_bug711404.js]
 [test_bug778409.js]
 [test_bug780370.js]
 [test_bug805807.js]
 [test_bug809652.js]
 [test_bug813901.js]
 [test_bug845201.js]
 [test_bug849730.js]
+[test_bug851895.js]
 [test_bug_442086.js]
 [test_file.js]
 [test_blob.js]
 [test_import.js]
 [test_import_fail.js]
 [test_js_weak_references.js]
 [test_reflect_parse.js]
 [test_localeCompare.js]