Synchronous image loading for opacity and backbuffer tests
This commit is contained in:
@@ -770,7 +770,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_setOpacity(t) {
|
function test_setOpacity(t) {
|
||||||
|
var origRequestFrame = OpenLayers.Animation.requestFrame;
|
||||||
|
OpenLayers.Animation.requestFrame = function(fn) { fn(); };
|
||||||
|
|
||||||
t.plan(5);
|
t.plan(5);
|
||||||
|
|
||||||
var map = new OpenLayers.Map('map');
|
var map = new OpenLayers.Map('map');
|
||||||
@@ -799,6 +801,8 @@
|
|||||||
t.eq(parseFloat(tile.imgDiv.style.opacity), 0.2, "tile opacity is correc");
|
t.eq(parseFloat(tile.imgDiv.style.opacity), 0.2, "tile opacity is correc");
|
||||||
|
|
||||||
map.destroy();
|
map.destroy();
|
||||||
|
|
||||||
|
OpenLayers.Animation.requestFrame = origRequestFrame
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_getServerResolution(t) {
|
function test_getServerResolution(t) {
|
||||||
@@ -1309,6 +1313,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_delayed_back_buffer_removal(t) {
|
function test_delayed_back_buffer_removal(t) {
|
||||||
|
var origRequestFrame = OpenLayers.Animation.requestFrame;
|
||||||
|
OpenLayers.Animation.requestFrame = function(fn) { fn(); };
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test that the delaying of the back buffer removal behaves
|
// Test that the delaying of the back buffer removal behaves
|
||||||
@@ -1353,6 +1359,8 @@
|
|||||||
// tear down
|
// tear down
|
||||||
|
|
||||||
map.destroy();
|
map.destroy();
|
||||||
|
|
||||||
|
OpenLayers.Animation.requestFrame = origRequestFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_getGridData(t) {
|
function test_getGridData(t) {
|
||||||
|
|||||||
Reference in New Issue
Block a user