aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-08-25 12:25:58 -0700
committerDave Methvin <dave.methvin@gmail.com>2011-08-25 12:25:58 -0700
commite57057739bf0b272113b4b7aa0f3efa369d3fd69 (patch)
treef4c9674df0a51c6d39338b43c5444432a041d8e2 /test/unit/core.js
parent3ba72f991dccbae6020c23d6f7a65435f4ca6f03 (diff)
parentad16db370e3a18819c9dea0f0e09495bafddd13c (diff)
downloadjquery-e57057739bf0b272113b4b7aa0f3efa369d3fd69.tar.gz
jquery-e57057739bf0b272113b4b7aa0f3efa369d3fd69.zip
Merge pull request #445 from rwldrn/9897
Fixes #9897. Wrap obj.constructor test in try/catch to avoid problems with host objects. Thanks to bkrausz.
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index a6783e02e..fdf0ceb5e 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -290,7 +290,7 @@ test("type", function() {
});
test("isPlainObject", function() {
- expect(14);
+ expect(15);
stop();
@@ -332,6 +332,13 @@ test("isPlainObject", function() {
ok(!jQuery.isPlainObject(window), "window");
try {
+ jQuery.isPlainObject( window.location );
+ ok( true, "Does not throw exceptions on host objects");
+ } catch ( e ) {
+ ok( false, "Does not throw exceptions on host objects -- FAIL");
+ }
+
+ try {
var iframe = document.createElement("iframe");
document.body.appendChild(iframe);