"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/underscore/test/cross-document.js" between
lodash-4.0.0.tar.gz and lodash-4.17.21.tar.gz

About: lodash is a modern JavaScript utility library delivering modularity, performance, & extras. Tagged version.

cross-document.js  (lodash-4.0.0):cross-document.js  (lodash-4.17.21)
skipping to change at line 38 skipping to change at line 38
'parent.iUndefined = undefined;', 'parent.iUndefined = undefined;',
'parent.iObject = {};', 'parent.iObject = {};',
'parent.iError = new Error();', 'parent.iError = new Error();',
'</script>' '</script>'
].join('\n') ].join('\n')
); );
iDoc.close(); iDoc.close();
QUnit.test('isEqual', function(assert) { QUnit.test('isEqual', function(assert) {
assert.ok(!_.isEqual(iNumber, 101)); assert.notOk(_.isEqual(iNumber, 101));
assert.ok(_.isEqual(iNumber, 100)); assert.ok(_.isEqual(iNumber, 100));
// Objects from another frame. // Objects from another frame.
assert.ok(_.isEqual({}, iObject), 'Objects with equivalent members created i n different documents are equal'); assert.ok(_.isEqual({}, iObject), 'Objects with equivalent members created i n different documents are equal');
// Array from another frame. // Array from another frame.
assert.ok(_.isEqual([1, 2, 3], iArray), 'Arrays with equivalent elements cre ated in different documents are equal'); assert.ok(_.isEqual([1, 2, 3], iArray), 'Arrays with equivalent elements cre ated in different documents are equal');
}); });
QUnit.test('isEmpty', function(assert) { QUnit.test('isEmpty', function(assert) {
assert.ok(!_([iNumber]).isEmpty(), '[1] is not empty'); assert.notOk(_([iNumber]).isEmpty(), '[1] is not empty');
assert.ok(!_.isEmpty(iArray), '[] is empty'); assert.notOk(_.isEmpty(iArray), '[] is empty');
assert.ok(_.isEmpty(iObject), '{} is empty'); assert.ok(_.isEmpty(iObject), '{} is empty');
}); });
QUnit.test('isElement', function(assert) { QUnit.test('isElement', function(assert) {
assert.ok(!_.isElement('div'), 'strings are not dom elements'); assert.notOk(_.isElement('div'), 'strings are not dom elements');
assert.ok(_.isElement(document.body), 'the body tag is a DOM element'); assert.ok(_.isElement(document.body), 'the body tag is a DOM element');
assert.ok(_.isElement(iElement), 'even from another frame'); assert.ok(_.isElement(iElement), 'even from another frame');
}); });
QUnit.test('isArguments', function(assert) { QUnit.test('isArguments', function(assert) {
assert.ok(_.isArguments(iArguments), 'even from another frame'); assert.ok(_.isArguments(iArguments), 'even from another frame');
}); });
QUnit.test('isObject', function(assert) { QUnit.test('isObject', function(assert) {
assert.ok(_.isObject(iElement), 'even from another frame'); assert.ok(_.isObject(iElement), 'even from another frame');
skipping to change at line 116 skipping to change at line 116
assert.ok(_.isUndefined(iUndefined), 'even from another frame'); assert.ok(_.isUndefined(iUndefined), 'even from another frame');
}); });
QUnit.test('isError', function(assert) { QUnit.test('isError', function(assert) {
assert.ok(_.isError(iError), 'even from another frame'); assert.ok(_.isError(iError), 'even from another frame');
}); });
if (typeof ActiveXObject != 'undefined') { if (typeof ActiveXObject != 'undefined') {
QUnit.test('IE host objects', function(assert) { QUnit.test('IE host objects', function(assert) {
var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); var xml = new ActiveXObject('Msxml2.DOMDocument.3.0');
assert.ok(!_.isNumber(xml)); assert.notOk(_.isNumber(xml));
assert.ok(!_.isBoolean(xml)); assert.notOk(_.isBoolean(xml));
assert.ok(!_.isNaN(xml)); assert.notOk(_.isNaN(xml));
assert.ok(!_.isFunction(xml)); assert.notOk(_.isFunction(xml));
assert.ok(!_.isNull(xml)); assert.notOk(_.isNull(xml));
assert.ok(!_.isUndefined(xml)); assert.notOk(_.isUndefined(xml));
}); });
QUnit.test('#1621 IE 11 compat mode DOM elements are not functions', functio n(assert) { QUnit.test('#1621 IE 11 compat mode DOM elements are not functions', functio n(assert) {
var fn = function() {}; var fn = function() {};
var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); var xml = new ActiveXObject('Msxml2.DOMDocument.3.0');
var div = document.createElement('div'); var div = document.createElement('div');
// JIT the function // JIT the function
var count = 200; var count = 200;
while (count--) { while (count--) {
 End of changes. 4 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)