Remove goog.net.* and goog.async.AnimationDelay
This commit is contained in:
@@ -7,24 +7,21 @@ describe('ol.source.BingMaps', function() {
|
||||
var source, tileGrid;
|
||||
|
||||
beforeEach(function(done) {
|
||||
var googNetJsonp = goog.net.Jsonp;
|
||||
// mock goog.net.Jsonp (used in the ol.source.TileJSON constructor)
|
||||
goog.net.Jsonp = function() {
|
||||
this.send = function() {
|
||||
var callback = arguments[1];
|
||||
var client = new XMLHttpRequest();
|
||||
client.open('GET', 'spec/ol/data/bing_aerialwithlabels.json', true);
|
||||
client.onload = function() {
|
||||
callback(JSON.parse(client.responseText));
|
||||
};
|
||||
client.send();
|
||||
var olNetJsonp = ol.net.Jsonp;
|
||||
// mock ol.net.Jsonp (used in the ol.source.TileJSON constructor)
|
||||
ol.net.Jsonp = function(url, callback) {
|
||||
var client = new XMLHttpRequest();
|
||||
client.open('GET', 'spec/ol/data/bing_aerialwithlabels.json', true);
|
||||
client.onload = function() {
|
||||
callback(JSON.parse(client.responseText));
|
||||
};
|
||||
client.send();
|
||||
};
|
||||
source = new ol.source.BingMaps({
|
||||
imagerySet: 'AerialWithLabels',
|
||||
key: ''
|
||||
});
|
||||
goog.net.Jsonp = googNetJsonp;
|
||||
ol.net.Jsonp = olNetJsonp;
|
||||
var key = source.on('change', function() {
|
||||
if (source.getState() === 'ready') {
|
||||
ol.Observable.unByKey(key);
|
||||
@@ -75,7 +72,7 @@ describe('ol.source.BingMaps', function() {
|
||||
});
|
||||
|
||||
|
||||
goog.require('goog.net.Jsonp');
|
||||
goog.require('ol.net.Jsonp');
|
||||
goog.require('ol.source.BingMaps');
|
||||
goog.require('ol.tilecoord');
|
||||
goog.require('ol.Observable');
|
||||
|
||||
Reference in New Issue
Block a user