aboutsummaryrefslogtreecommitdiffstats
path: root/test/AngularSpec.js
AgeCommit message (Collapse)Author
2014-02-27chore(AngularSpec): fix typoLajos Veres
2014-02-21fix(isElement): reduce false-positives in isElement testsCaitlin Potter
Complimentary change to match changed $parse behaviour.
2014-02-04fix(ngResource): don't filter "$"-prefixed properties from ngResource ↵Thomas Belin
requests/responses ngResource no longer filters properties prefixed with a single "$" character from requests or responses, correcting a regression introduced in 1.2.6 (cb29632a) which caused shallowCopy and shallowClearAndCopy to ignore properties prefixed with a single "$". Closes #5666 Closes #6080 Closes #6033
2013-12-18fix(forEach): allow looping over result of querySelectorAll in IE8Tobias Bosch
In IE8 the result object of calling `node.querySelectorAll` does not have a `hasOwnPropery` function. However, it should be usable with `forEach`. Related to #5400.
2013-12-05fix(isElement): return boolean value rather than `truthy` value.Caitlin Potter
angular.isElement currently returns a truthy object/function, or false. This patch aims to correct this behaviour by casting the result of the isElement expression to a boolean value via double-negation. Closes #4519 Closes #4534
2013-10-18fix(csp): fix csp auto-detection and stylesheet injectionIgor Minar
When we refactored , we broke the csp mode because the previous implementation relied on the fact that it was ok to lazy initialize the .csp property, this is not the case any more. Besides, we need to know about csp mode during bootstrap and avoid injecting the stylesheet when csp is active, so I refactored the code to fix both issues. PR #4411 will follow up on this commit and add more improvements. Closes #917 Closes #2963 Closes #4394 Closes #4444 BREAKING CHANGE: triggering ngCsp directive via `ng:csp` attribute is not supported any more. Please use data-ng-csp instead.
2013-10-07fix(*): protect calls to hasOwnProperty in public APIPeter Bacon Darwin
Objects received from outside AngularJS may have had their `hasOwnProperty` method overridden with something else. In cases where we can do this without incurring a performance penalty we call directly on Object.prototype.hasOwnProperty to ensure that we use the correct method. Also, we have some internal hash objects, where the keys for the map are provided from outside AngularJS. In such cases we either prevent `hasOwnProperty` from being used as a key or provide some other way of preventing our objects from having their `hasOwnProperty` overridden. BREAKING CHANGE: Inputs with name equal to "hasOwnProperty" are not allowed inside form or ngForm directives. Before, inputs whose name was "hasOwnProperty" were quietly ignored and not added to the scope. Now a badname exception is thrown. Using "hasOwnProperty" for an input name would be very unusual and bad practice. Either do not include such an input in a `form` or `ngForm` directive or change the name of the input. Closes #3331
2013-10-07style(angularSpec): add missing semicolonPeter Bacon Darwin
2013-10-02fix(isArrayLike): correctly handle string primitivesDaniel Luz
Closes #3356
2013-08-29fix(core): parse IE11 UA string correctlyChirayu Krishnappa
It's great that IE11 wants to be compatible enough that it doesn't want to be special cased and treated differently. However, as long as one has to have a different code path for IE than for the other supported browsers, we still need to detect and special case it. For instance, our URL parsing code still needs the same workaround the we used for IE10. We still see the same Access denied / TypeError exceptions when setting certain values. FYI, Angular doesn't generally blindly test for IE – we also check the version number. Thanks to modern.ie for the free IE11 test VM. Closes #3682
2013-08-23test: rename / remove duplicate unit testsVojta Jina
2013-08-15feat(minerr): log minerr doc url in developmentKen Sheedlo
Closes #3566
2013-08-09fix(re-bootstrap): Throw an error when bootstrapping a bootstrapped element.Jeff Cross
Nothing would prevent a user from accidentally calling angular.bootstrap on an element that had already been bootstrapped. If this was done, odd behavior could manifest in an application, causing different scopes to update the same DOM, and causing debugger confusion. This fix adds a check inside of angular.bootstrap to check if the passed-in element already has an injector, and if so, will throw an error.
2013-08-08fix(angular.copy): change angular.copy to correcly clone RegExpAndy Hitchman
angular.copy previously copied RegExp as an empty object. Change detects RegExp instance and clones into new RegExp. This change is based on a previous fix to allow Date to be copied. Closes #3473 Closes #3474
2013-07-24fix(equals): {} and [] should not be considered equivalentBrenton
angular.equals was returning inconsistent values for the comparison between {} and []: angular.equals({}, []) // true angular.equals([], {}]) // false Since these object are not of the same type, they should not be considered equivalent.
2013-07-16test(utils): Adds a missing test for snake_caseJames deBoer
2013-07-13fix(angular.equals): add support for regular expressionsBen Ripkens
Regular expression objects didn't used to be considered to be equal when using 'angular.equals'. Dirty checking therefore failed to recognize a property modification. Closes #2685
2013-07-12feat(Angular.js): skip JSON.stringify for undefinedGreg Thornton
Return early in `angular.toJson` if the object to be stringified is `undefined`. IE8 stringifies `undefined` to `'undefined'` whereas other browsers return `undefined`. This normalizes behavior and passes currently broken unit tests in IE8.
2013-07-08fix(angular.equals): do not match keys defined in the prototype chainDaniel Luz
Merely testing for object[key] will give incorrect results on keys defined in Object.prototype. Note: IE8 is generally broken in this regard since `for...in` never returns certain property keys even if they are defined directly on the object. See #2141 - partially merges this PR
2013-07-02fix($injector): refactor module loading code and use minErrIgor Minar
2013-07-01fix(Angular.js): handle duplicate params in parseKeyValue/toKeyValuejoshkurz
parseKeyValue and toKeyValue can now handle duplicate values in the query. ``` ?x=1&x=2 <-> {x:[1,2]} ``` The algorithm looks like: 1)parseKeyValue looks for presence of obj[key] 2)detects and replaces obj[key] with [obj[key],val] 3)then pushes more duplicates if necessary 4)toKeyValue decodes array correctly 5)(not changed)$location.search({param: 'key'}) still replaces if necessary 6)(not changed)$location.search({param: ['key1', 'key2']}) sets the url with duplicates BREAKING CHANGE: Before this change: - `parseKeyValue` only took the last key overwriting all the previous keys; - `toKeyValue` joined the keys together in a comma delimited string. This was deemed buggy behavior. If your server relied on this behavior then either the server should be fixed or a simple serialization of the array should be done on the client before passing it to $location.
2013-06-20fix(Angular.js): don't crash on invalid query parametersPete Bacon Darwin
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-06-06chore(AngularPublic): remove angular.noConflict featureMatias Niemelä
2013-05-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-05-08fix(angular): do not copy $$hashKey in copy/extend functions.R. Merkert
Copying the $$hashKey as part of copy/extend operations makes little sense since hashkey is used primarily as an object id, especially in the context of the ngRepeat directive. This change maintains the existing $$hashKey of an object that is being copied into (likewise for extend). It is not uncommon to take an item in a collection, copy it, and then append it to the collection. By copying the $$hashKey, this leads to duplicate object errors with the current ngRepeat. Closes #1875
2013-03-06feat(angular.bootstrap): support deferred bootstrapJulie
This features enables tools like Batarang and test runners to hook into angular's bootstrap process and sneak in more modules into the DI registry which can replace or augment DI services for the purpose of instrumentation or mocking out heavy dependencies. If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap is called. angular.resumeBootstrap takes an optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
2013-02-26fix($http): don't encode URL query substring "null" to "+"Andrew McLeod
Fixes issue in encodeUriQuery used by $http and $resource that treats null as a string and replaces the characters "null" with "+".
2013-02-14feat(noConflict): restore previous angular namespace referenceJames Morrin
2013-02-14fix(compiler): Allow startingTag method to handle text / comment nodesShyam Seshadri
2013-02-11test(angular.copy): add tests for scenarios when target is missingIgor Minar
2013-02-11fix(angular.forEach): correctly iterate over objects with length propIgor Minar
Should handle JQLite, jQuery, NodeList and other objects like arrays but not other generic objects or instances of user defined types with length property. Closes #1840
2013-01-22fix(angular.equals): relax the comparison for undefined propertiesIgor Minar
in 5ae63fd3 the comparison was made consistent but strict, so that angular.equals({}, {foo: undefined}) // always returns false this turns out to cause issues for data that is being roundtripped via network and serialized via JSON because JSON.stringify serializes {foo: undefined} as {}. Since angular.equals() behaved like this before the 5ae63fd3 in 50% of the cases, changing the behavior in this way should not introduce any significant issues. Closes #1648
2013-01-17fix(angular.equals): consistently compare undefined object propsIgor Minar
previously: a = {}; b = {x:undefined}; angular.equals(a, b) == angular.equals(b, a) // returns false. both should return false because these objects are not equal. unlike in implemented in #1695 the comparison should be stricter and return false not true. if we need to relax this in the future we can always do so. Closes #1648
2012-08-30test(bootstrap): test exception siling during bootstrapIgor Minar
Closes #1018
2012-08-30test(ngApp): add missing test for [ng-app] bootstrapIgor Minar
2012-06-08fix(startingTag): make tag name always lowercaseIgor Minar
some browsers (IE) always provide the nodeName as upper-case
2012-04-09chore(tests): rename all directive names to the normalized formIgor Minar
2012-03-29refactor($compile): move methods of attr object into prototypeVojta Jina
We have many instances of this object and we clone them as well (e.g. ng-repeat). This should save some memory and performance as well. Double prefixed private properties of attr object: attr.$element -> attr.$$element attr.$observers -> attr.$$observers Update shallowCopy to not copy $$ properties and allow passing optional destination object.
2012-03-28refactor(fromJson/toJson): move the contents of these files into Angular.jsIgor Minar
these files are now mostly empty so it doesn't make sense to keep them separated from other helper functions
2012-03-22fix(forEach): should ignore prototypically inherited propertiesIgor Minar
Closes #813
2012-03-09fix(startTag): fix tagname extractionIgor Minar
the original code magically worked for ng:foo but for nothing else
2012-03-09chore(*): refactor all ng: to ng-Igor Minar
2012-02-23bug(equals): incorect comparison of datesMisko Hevery
2012-01-25refactor(directives): connect new compilerMisko Hevery
- turn everything into a directive
2012-01-25add($compile): add compiler v2.0 - not connectedMisko Hevery
2012-01-12refactor(module): strict separation between module-config / app-runtimeMisko Hevery
2012-01-10feat(module): new module loaderMisko Hevery
2012-01-06fix(angular.copy): throw Error if source and destination are identicalDhruv Manek
Closes #693
2011-11-30fix(copy,equals): prevent browser crashes with Scope or WindowIgor Minar
Scope and Window instances are special and when copied can crash browser. For this reason it makes sense to compare them only by identity.