r107321 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107320‎ | r107321 | r107322 >
Date:15:04, 26 December 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Updating jquery.qunit from upstream
* Source: https://github.com/jquery/qunit/tree/0aba72f723579082735782231a3503aa249618aa
* 1.2.0pre (master/trunk) -> v1.2.0 (release tag)
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.qunit.css (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.qunit.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.qunit.js
@@ -1,5 +1,5 @@
22 /**
3 - * QUnit 1.2.0pre - A JavaScript Unit Testing Framework
 3+ * QUnit v1.2.0 - A JavaScript Unit Testing Framework
44 *
55 * http://docs.jquery.com/QUnit
66 *
@@ -1065,6 +1065,10 @@
10661066 }
10671067 }
10681068
 1069+ var getProto = Object.getPrototypeOf || function (obj) {
 1070+ return obj.__proto__;
 1071+ };
 1072+
10691073 var callbacks = function () {
10701074
10711075 // for string, boolean, number and null
@@ -1154,7 +1158,13 @@
11551159 // comparing constructors is more strict than using
11561160 // instanceof
11571161 if (a.constructor !== b.constructor) {
1158 - return false;
 1162+ // Allow objects with no prototype to be equivalent to
 1163+ // objects with Object as their constructor.
 1164+ if (!((getProto(a) === null && getProto(b) === Object.prototype) ||
 1165+ (getProto(b) === null && getProto(a) === Object.prototype)))
 1166+ {
 1167+ return false;
 1168+ }
11591169 }
11601170
11611171 // stack constructor before traversing properties
Index: trunk/phase3/resources/jquery/jquery.qunit.css
@@ -1,5 +1,5 @@
22 /**
3 - * QUnit 1.2.0pre - A JavaScript Unit Testing Framework
 3+ * QUnit v1.2.0 - A JavaScript Unit Testing Framework
44 *
55 * http://docs.jquery.com/QUnit
66 *

Comments

#Comment by Hashar (talk | contribs)   11:09, 3 January 2012

Status & tagging log