Skip to content

Commit 2764536

Browse files
committed
refct(privateMocks): remove unused argument from createMockStyleSheet()
1 parent 8ccc054 commit 2764536

File tree

7 files changed

+12
-13
lines changed

7 files changed

+12
-13
lines changed

test/helpers/privateMocks.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ function browserSupportsCssAnimations() {
4040
return true;
4141
}
4242

43-
function createMockStyleSheet(doc, wind) {
43+
function createMockStyleSheet(doc) {
4444
doc = doc ? doc[0] : document;
45-
wind = wind || window;
4645

4746
var node = doc.createElement('style');
4847
var head = doc.getElementsByTagName('head')[0];

test/helpers/privateMocksSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ describe('private mocks', function() {
211211

212212
var doc = $document[0];
213213
var count = doc.styleSheets.length;
214-
var stylesheet = createMockStyleSheet($document, $window);
214+
var stylesheet = createMockStyleSheet($document);
215215
var elm;
216216
runs(function() {
217217
expect(doc.styleSheets.length).toBe(count + 1);

test/ng/directive/ngRepeatSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1491,11 +1491,11 @@ describe('ngRepeat animations', function() {
14911491
}));
14921492

14931493
it('should not change the position of the block that is being animated away via a leave animation',
1494-
inject(function($compile, $rootScope, $animate, $document, $window, $sniffer, $timeout) {
1494+
inject(function($compile, $rootScope, $animate, $document, $sniffer, $timeout) {
14951495
if (!$sniffer.transitions) return;
14961496

14971497
var item;
1498-
var ss = createMockStyleSheet($document, $window);
1498+
var ss = createMockStyleSheet($document);
14991499

15001500
try {
15011501

test/ngAnimate/animateCssDriverSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ describe("ngAnimate $$animateCssDriver", function() {
6969

7070
element = jqLite('<div></div>');
7171

72-
return function($$animateCssDriver, $document, $window) {
72+
return function($$animateCssDriver, $document) {
7373
driver = function(details, cb) {
7474
return $$animateCssDriver(details, cb || noop);
7575
};
76-
ss = createMockStyleSheet($document, $window);
76+
ss = createMockStyleSheet($document);
7777
};
7878
}));
7979

test/ngAnimate/animateCssSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ describe("ngAnimate $animateCss", function() {
2828

2929
var ss, prefix, triggerAnimationStartFrame;
3030
beforeEach(module(function() {
31-
return function($document, $window, $sniffer, $$rAF, $animate) {
31+
return function($document, $sniffer, $$rAF, $animate) {
3232
prefix = '-' + $sniffer.vendorPrefix.toLowerCase() + '-';
33-
ss = createMockStyleSheet($document, $window);
33+
ss = createMockStyleSheet($document);
3434
$animate.enabled(true);
3535
triggerAnimationStartFrame = function() {
3636
$$rAF.flush();

test/ngAnimate/integrationSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ describe('ngAnimate integration tests', function() {
77

88
var element, html, ss;
99
beforeEach(module(function() {
10-
return function($rootElement, $document, $window, $animate) {
10+
return function($rootElement, $document, $animate) {
1111
$animate.enabled(true);
1212

13-
ss = createMockStyleSheet($document, $window);
13+
ss = createMockStyleSheet($document);
1414

1515
var body = jqLite($document[0].body);
1616
html = function(element) {

test/ngMock/angular-mocksSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2046,8 +2046,8 @@ describe('ngMockE2E', function() {
20462046
}
20472047
});
20482048

2049-
return function($animate, $rootElement, $document, $rootScope, $window) {
2050-
ss = createMockStyleSheet($document, $window);
2049+
return function($animate, $rootElement, $document, $rootScope) {
2050+
ss = createMockStyleSheet($document);
20512051

20522052
element = angular.element('<div class="animate"></div>');
20532053
$rootElement.append(element);

0 commit comments

Comments
 (0)