| OLD | NEW |
| 1 /** | 1 /** |
| 2 * QUnit v1.7.0pre - A JavaScript Unit Testing Framework | 2 * QUnit v1.7.0pre - A JavaScript Unit Testing Framework |
| 3 * | 3 * |
| 4 * http://docs.jquery.com/QUnit | 4 * http://docs.jquery.com/QUnit |
| 5 * | 5 * |
| 6 * Copyright (c) 2012 John Resig, Jörn Zaefferer | 6 * Copyright (c) 2012 John Resig, Jörn Zaefferer |
| 7 * Dual licensed under the MIT (MIT-LICENSE.txt) | 7 * Dual licensed under the MIT (MIT-LICENSE.txt) |
| 8 * or GPL (GPL-LICENSE.txt) licenses. | 8 * or GPL (GPL-LICENSE.txt) licenses. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 return true; | 1318 return true; |
| 1319 }, | 1319 }, |
| 1320 | 1320 |
| 1321 "object": function( b, a ) { | 1321 "object": function( b, a ) { |
| 1322 var i, j, loop, | 1322 var i, j, loop, |
| 1323 // Default to true | 1323 // Default to true |
| 1324 eq = true, | 1324 eq = true, |
| 1325 aProperties = [], | 1325 aProperties = [], |
| 1326 bProperties = []; | 1326 bProperties = []; |
| 1327 | 1327 |
| 1328 /***************** |
| 1329 * HACK: Disable this code, it won't do well when comparing objects |
| 1330 * from different scopes (different prototypes). |
| 1331 |
| 1328 // comparing constructors is more strict
than using | 1332 // comparing constructors is more strict
than using |
| 1329 // instanceof | 1333 // instanceof |
| 1330 if ( a.constructor !== b.constructor ) { | 1334 if ( a.constructor !== b.constructor ) { |
| 1331 // Allow objects with no prototy
pe to be equivalent to | 1335 // Allow objects with no prototy
pe to be equivalent to |
| 1332 // objects with Object as their
constructor. | 1336 // objects with Object as their
constructor. |
| 1333 if ( !(( getProto(a) === null &&
getProto(b) === Object.prototype ) || | 1337 if ( !(( getProto(a) === null &&
getProto(b) === Object.prototype ) || |
| 1334 ( getProto(b) === null &
& getProto(a) === Object.prototype ) ) ) { | 1338 ( getProto(b) === null &
& getProto(a) === Object.prototype ) ) ) { |
| 1335 return false; | 1339 return false; |
| 1336 } | 1340 } |
| 1337 } | 1341 } |
| 1342 *****************/ |
| 1338 | 1343 |
| 1339 // stack constructor before traversing p
roperties | 1344 // stack constructor before traversing p
roperties |
| 1340 callers.push( a.constructor ); | 1345 callers.push( a.constructor ); |
| 1341 // track reference to avoid circular ref
erences | 1346 // track reference to avoid circular ref
erences |
| 1342 parents.push( a ); | 1347 parents.push( a ); |
| 1343 | 1348 |
| 1344 for ( i in a ) { // be strict: don't ens
ures hasOwnProperty | 1349 for ( i in a ) { // be strict: don't ens
ures hasOwnProperty |
| 1345 // and g
o deep | 1350 // and g
o deep |
| 1346 loop = false; | 1351 loop = false; |
| 1347 for ( j = 0; j < parents.length;
j++ ) { | 1352 for ( j = 0; j < parents.length;
j++ ) { |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1794 }; | 1799 }; |
| 1795 }()); | 1800 }()); |
| 1796 | 1801 |
| 1797 // for CommonJS enviroments, export everything | 1802 // for CommonJS enviroments, export everything |
| 1798 if ( typeof exports !== "undefined" ) { | 1803 if ( typeof exports !== "undefined" ) { |
| 1799 extend(exports, QUnit); | 1804 extend(exports, QUnit); |
| 1800 } | 1805 } |
| 1801 | 1806 |
| 1802 // get at whatever the global object is, like window in browsers | 1807 // get at whatever the global object is, like window in browsers |
| 1803 }( (function() {return this;}.call()) )); | 1808 }( (function() {return this;}.call()) )); |
| OLD | NEW |