Skip to content

Commit

Permalink
Update backbone and qunit test deps
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulUithol committed Aug 23, 2011
1 parent 4e8602a commit d76b3e5
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 211 deletions.
22 changes: 13 additions & 9 deletions test/lib/backbone.js
@@ -1,4 +1,4 @@
// Backbone.js 0.5.2
// Backbone.js 0.5.3
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
Expand All @@ -25,7 +25,7 @@
}

// Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '0.5.2';
Backbone.VERSION = '0.5.3';

// Require Underscore, if we're on the server, and it's not already present.
var _ = root._;
Expand All @@ -41,7 +41,7 @@
return this;
};

// Turn on `emulateHTTP` to use support legacy HTTP servers. Setting this option will
// Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option will
// fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and set a
// `X-Http-Method-Override` header.
Backbone.emulateHTTP = false;
Expand Down Expand Up @@ -71,7 +71,7 @@
bind : function(ev, callback, context) {
var calls = this._callbacks || (this._callbacks = {});
var list = calls[ev] || (calls[ev] = []);
list.push([callback, context || this]);
list.push([callback, context]);
return this;
},

Expand Down Expand Up @@ -114,7 +114,7 @@
list.splice(i, 1); i--; l--;
} else {
args = both ? Array.prototype.slice.call(arguments, 1) : arguments;
callback[0].apply(callback[1], args);
callback[0].apply(callback[1] || this, args);
}
}
}
Expand Down Expand Up @@ -641,7 +641,7 @@
var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find', 'detect',
'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include',
'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex', 'toArray', 'size',
'first', 'rest', 'last', 'without', 'indexOf', 'lastIndexOf', 'isEmpty'];
'first', 'rest', 'last', 'without', 'indexOf', 'lastIndexOf', 'isEmpty', 'groupBy'];

// Mix in each Underscore method as a proxy to `Collection#models`.
_.each(methods, function(method) {
Expand Down Expand Up @@ -766,7 +766,7 @@
fragment = window.location.hash;
}
}
return fragment.replace(hashStrip, '');
return decodeURIComponent(fragment.replace(hashStrip, ''));
},

// Start the hash change handling, returning `true` if the current URL matches
Expand Down Expand Up @@ -812,7 +812,10 @@
this.fragment = loc.hash.replace(hashStrip, '');
window.history.replaceState({}, document.title, loc.protocol + '//' + loc.host + this.options.root + this.fragment);
}
return this.loadUrl();

if (!this.options.silent) {
return this.loadUrl();
}
},

// Add a route to be tested when the fragment changes. Routes added later may
Expand Down Expand Up @@ -949,6 +952,7 @@
// not `change`, `submit`, and `reset` in Internet Explorer.
delegateEvents : function(events) {
if (!(events || (events = this.events))) return;
if (_.isFunction(events)) events = events.call(this);
$(this.el).unbind('.delegateEvents' + this.cid);
for (var key in events) {
var method = this[events[key]];
Expand Down Expand Up @@ -1070,7 +1074,7 @@
}

// Don't process data on a non-GET request.
if (params.type !== 'GET' && ! Backbone.emulateJSON) {
if (params.type !== 'GET' && !Backbone.emulateJSON) {
params.processData = false;
}

Expand Down
25 changes: 16 additions & 9 deletions test/lib/qunit.css
@@ -1,11 +1,17 @@
#qunit-tests li strong {
font-weight: normal;
}
/**
* QUnit - A JavaScript Unit Testing Framework
*
* http://docs.jquery.com/QUnit
*
* Copyright (c) 2011 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/

/** Font Family and Sizes */

#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}

#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
Expand All @@ -31,7 +37,7 @@
font-size: 1.5em;
line-height: 1em;
font-weight: normal;

border-radius: 15px 15px 0 0;
-moz-border-radius: 15px 15px 0 0;
-webkit-border-top-right-radius: 15px;
Expand Down Expand Up @@ -99,13 +105,13 @@
#qunit-tests ol {
margin-top: 0.5em;
padding: 0.5em;

background-color: #fff;

border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;

box-shadow: inset 0px 2px 13px #999;
-moz-box-shadow: inset 0px 2px 13px #999;
-webkit-box-shadow: inset 0px 2px 13px #999;
Expand Down Expand Up @@ -168,7 +174,7 @@

#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests .pass .test-name { color: #366097; }

#qunit-tests .pass .test-actual,
#qunit-tests .pass .test-expected { color: #999999; }

Expand All @@ -180,6 +186,7 @@
color: #710909;
background-color: #fff;
border-left: 26px solid #EE5757;
white-space: pre;
}

#qunit-tests > li:last-child {
Expand Down

0 comments on commit d76b3e5

Please sign in to comment.