Remove remaining goog.object use from tests
This commit is contained in:
@@ -46,7 +46,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
expect(pointerEvent2.clientX).to.be(30);
|
||||
expect(pointerEvent2.clientY).to.be(45);
|
||||
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(2);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(2);
|
||||
});
|
||||
|
||||
it('creates the right pointer events', function() {
|
||||
@@ -57,7 +57,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
{identifier: 3, clientX: 10, clientY: 11}
|
||||
]);
|
||||
expect(eventSpy.calledOnce).to.be.ok();
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(1);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(1);
|
||||
|
||||
// second touch (first touch still down)
|
||||
simulateTouchEvent('touchstart', [
|
||||
@@ -65,7 +65,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
], [{identifier: 3}, {identifier: 4}]
|
||||
);
|
||||
expect(eventSpy.calledTwice).to.be.ok();
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(2);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(2);
|
||||
|
||||
// first touch moves
|
||||
var moveEventSpy = sinon.spy();
|
||||
@@ -87,7 +87,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
], [{identifier: 3}, {identifier: 4}]
|
||||
);
|
||||
expect(upEventSpy.calledTwice).to.be.ok();
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(0);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(0);
|
||||
});
|
||||
|
||||
it('handles flawed touches', function() {
|
||||
@@ -98,7 +98,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
{identifier: 3, clientX: 10, clientY: 11}
|
||||
]);
|
||||
expect(eventSpy.calledOnce).to.be.ok();
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(1);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(1);
|
||||
|
||||
// second touch, but the first touch has disappeared
|
||||
var cancelEventSpy = sinon.spy();
|
||||
@@ -111,7 +111,7 @@ describe('ol.pointer.TouchSource', function() {
|
||||
|
||||
// the first (broken) touch is canceled
|
||||
expect(cancelEventSpy.calledOnce).to.be.ok();
|
||||
expect(goog.object.getCount(handler.pointerMap)).to.be(1);
|
||||
expect(Object.keys(handler.pointerMap).length).to.be(1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -127,7 +127,6 @@ describe('ol.pointer.TouchSource', function() {
|
||||
}
|
||||
});
|
||||
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.events.Event');
|
||||
goog.require('ol.events.EventTarget');
|
||||
|
||||
Reference in New Issue
Block a user