diff --git a/tests/test_Ajax.html b/tests/test_Ajax.html
index fc52c0ead8..cd5a4b78b7 100644
--- a/tests/test_Ajax.html
+++ b/tests/test_Ajax.html
@@ -7,7 +7,7 @@
t.plan(1);
var req = OpenLayers.Ajax.Request;
OpenLayers.ProxyHost = "/?url=";
- OpenLayers.Ajax.Request = function(uri) {
+ OpenLayers.Ajax.Request.prototype.request = function(uri) {
t.eq(uri, "/?url=http%3A%2F%2Fexample.com%2F%3Fformat%3Dimage%2Bkml", "URI matches what we expect from loadurl");
}
OpenLayers.loadURL("http://example.com/?format=image+kml");