diff options
| author | Peter Bacon Darwin | 2014-02-12 22:47:42 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:41 +0000 |
| commit | 389d4879da4aa620ee95d789b19ff9be44eb730a (patch) | |
| tree | 93352ddc8738a975904a1774d51b93d585ca1075 /docs/component-spec/mocks.js | |
| parent | a564160511bf1bbed5a4fe5d2981fae1bb664eca (diff) | |
| download | angular.js-389d4879da4aa620ee95d789b19ff9be44eb730a.tar.bz2 | |
chore(doc-gen): new docs
chore(doc-gen): implement dgeni
Diffstat (limited to 'docs/component-spec/mocks.js')
| -rw-r--r-- | docs/component-spec/mocks.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/docs/component-spec/mocks.js b/docs/component-spec/mocks.js deleted file mode 100644 index f916c0ed..00000000 --- a/docs/component-spec/mocks.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copy/pasted from src/Angular.js, so that we can disable specific tests on IE. -var msie = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10); - -var createMockWindow = function() { - var mockWindow = {}; - var setTimeoutQueue = []; - - mockWindow.location = window.location; - mockWindow.document = window.document; - mockWindow.getComputedStyle = angular.bind(window, window.getComputedStyle); - mockWindow.scrollTo = angular.bind(window, window.scrollTo); - mockWindow.navigator = window.navigator; - mockWindow.setTimeout = function(fn, delay) { - setTimeoutQueue.push({fn: fn, delay: delay}); - }; - mockWindow.setTimeout.queue = setTimeoutQueue; - mockWindow.setTimeout.expect = function(delay) { - if (setTimeoutQueue.length > 0) { - return { - process: function() { - var tick = setTimeoutQueue.shift(); - expect(tick.delay).toEqual(delay); - tick.fn(); - } - }; - } else { - expect('SetTimoutQueue empty. Expecting delay of ').toEqual(delay); - } - }; - - return mockWindow; -}; |
