| Age | Commit message (Collapse) | Author | 
|---|
|  | In some specific timezones and operating systems, it seems that
getTimezoneOffset() can return an incorrect value for negative timestamps, as
described in #5017. While this isn't something easily fixed in the mock code,
the tests can avoid that particular timeframe by using a positive timestamp.
Closes #5017
Closes #6730 | 
|  | It's now possible to pass a function to match the URL in $httpBackend mocked
expectations. This gives a more sophisticate control over the URL matching
without requiring complex RegExp mantainance or the workaround of creating
an object with a `test` function in order to mimic RegExp interface.
This approach was suggested in [this
thread](https://groups.google.com/d/msg/angular/3QsCUEvvxlM/Q4C4ZIqNIuEJ)
Closes #4580 | 
|  | supplied
Closes #6103.
Closed #6099. | 
|  | the current spec
Currently when a function is injected inside of a test we set the context to undefined which
is a bug.
Closes #6102 | 
|  | My bad when merging 7e916455b36dc9ca4d4afc1e44cade90006d00e3.
These tests are run with compiled Angular and then the msie is not defined. | 
|  | Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0
treat the stack property as non-configurable and unwritable.
Because window.inject captures the stack at the time of the inject,
and attempts to insert it into a captured throw from the injected
function by modifying e.stack, a meaningless error message and
stack is thrown instead.
This commit inserts two tests exposing the problem, and implements
a proposed solution that builds a new error-like object that mimicks
the old Error object, but with the additional stack information, and
captures the toString function from the Error object prototype.  This
appears to work for the browsers suppoerted here. | 
|  | Copy mock data returned from the mock $httpBackend.
This prevents modifications to the response from affecting future responses.
Previously, this misbehavior was being mitigated by the deep copy in $resource, but that no longer exists. | 
|  | Fixes an issue with httpBackend expectations where a given body object
may not match the actual request body if its keys are serialized in a
different order.
Closes #4956 | 
|  | Some tests were wrong. However, src/* did not contain problems.
Fixes #5046 | 
|  | The routeUtils.js file was declaring a number of functions that were
leaking into other modules such as ngMocks causing tests to pass
incorrectly.
Closes #4360 | 
|  | The $interval service simplifies creating and testing recurring tasks.
This service does not increment $browser's outstanding request count,
which means that scenario tests and Protractor tests will not timeout
when a site uses a polling function registered by $interval. Provides
a workaround for #2402.
For unit tests, repeated tasks can be controlled using ngMock$interval's
tick(), tickNext(), and tickAll() functions. | 
|  | 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 | 
|  |  | 
|  |  | 
|  | This reverts commit cbf06a5d64aba537f0e2679a194d3998d8365493.
This turned out to be a bad idea because it allow us to fast-forward
the wall clock time (see previous commit). | 
|  | This reverts commit 42af8eada2803a54a98b4f792e60feb480d68a0c.
This turned out to be a bad idea as it prevents us from moving the
time forward and asserting that the component state didn't change
due to the scheduled task executing too early. | 
|  | When $timeout#flush is called with a delay and no task can be flushed within that
delay, the current time should not be updated as that gets the mock into an inconsistent
state.
BREAKING CHANGE: if a tests was written around the buggy behavior the delays might be off now
This would typically not be a problem, but because of the previous breaking change in
$timeout.flush, the combination of two might be confusing and that's why we are documenting
it.
Old behavior:
```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now
try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); //flushes only doSomething() task
```
New behavior:
```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now
try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); // throws "no task to be flushed" exception again
                  // because previous exception didn't move the time forward
```
Fixed test:
```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now
try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(500); // flushes only doSomething() task
``` | 
|  | When calling $timeout.flush with or without a delay an exception should
be thrown if there is nothing to be flushed.
This prevents tests from flushing stuff unnecessarily.
BREAKING CHANGE: calling $timeout.flush(delay) when there is no task to be flushed
within the delay throws an exception now.
Please adjust the delay or remove the flush call from your tests as the exception
is a signed of a programming error. | 
|  |  | 
|  | Add support for passing function as validating data:
 - To avoid hacking test method of RegExp
 - Optionally overwrite `toString` method of fn to show validation tips
 - change docs: param description for `when`, `whenPost`, `whenPut`,
   `expect`, `expectPost`, `expectPut`, `expectPATCH`
Closes: #2981 | 
|  | When using passThrough() and specifying withCredentials on the $http
call, the option is now passed to the underlying $httpBackend. | 
|  | Closes #2343 | 
|  | the $timeout mock's flush method allows flushing queued up requests
but doesn't allow to for checking with what delay a task was queued
up. flushNext flushes the next queued up task and can asserts the
scheduled delay. | 
|  |  | 
|  | This code is not being used any more and the test is now failing
due to Karma changes. Karma used to expose window.dump but that
changed recently and that's why our build is now failing.
I'm removing the code and test, but we still need to figure out
how to route window.dump through angular.mock.dump, but that will
have to be a separate commit. | 
|  | jQuery switched to a completely new event binding implementation as of
1.7.0, centering around on/off methods instead of previous bind/unbind.
This patch makes jqLite match this implementation while still supporting
previous bind/unbind methods. | 
|  | If the timeout argument is a promise, abort the request when it is resolved.
Implemented by adding support to $httpBackend service and $httpBackend mock
service.
This api can also be used to explicitly abort requests while keeping the
communication between the deffered and promise unidirectional.
Closes #1159 | 
|  | Also Implement getMilliseconds() method of TzDate and
add test for this in ngMock. | 
|  | added verifyNoPendingTasks method, which throws error if not all
deferred tasks have been flushed
Closes #1245 | 
|  |  | 
|  | Publish the application root element as $rootElement
so that it can be injected to other services. | 
|  | $timeout has a better name ($defer got often confused with something related to $q) and
is actually promise based with cancelation support.
With this commit the $defer service is deprecated and will be removed before 1.0.
Closes #704, #532 | 
|  |  | 
|  | Since angular attaches scope/injector/controller
into DOM it should clean up after itself. No need
to complain about memory leaks, since they can
only happened on detached DOM. Detached DOM would
only be in tests, since in production the DOM
would be attached to render tree and removal
would automatically clear memory. | 
|  | Properly serialize data into request body instead of url.
Closes #887 | 
|  | this was never meant to be a public api used by apps. I refactored
the code to hide the functionality.
BREAKING CHANGE: $browser.addJs method was removed
apps that depended on this functionality should either use many of the
existing script loaders or create a simple helper method specific to the
app. | 
|  |  | 
|  |  | 
|  |  |