aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2011-07-25 17:06:38 -0400
committerRick Waldron <waldron.rick@gmail.com>2011-07-25 17:06:38 -0400
commitad16db370e3a18819c9dea0f0e09495bafddd13c (patch)
treebbf14ee3c2da2d6dd7071eda561ae40050efd1ae /test/unit
parent27291ff06ddb655f90a8d1eada71f7ac61499b12 (diff)
downloadjquery-ad16db370e3a18819c9dea0f0e09495bafddd13c.tar.gz
jquery-ad16db370e3a18819c9dea0f0e09495bafddd13c.zip
Wrap obj.constructor test in try/catch. Thanks to bkrausz. Fixes #9897
Diffstat (limited to 'test/unit')
-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 8c285f6dd..7599455df 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);