diff --git a/static/script-tests/tests/devices/device.js b/static/script-tests/tests/devices/device.js index b3a4f800..77d1e3b6 100644 --- a/static/script-tests/tests/devices/device.js +++ b/static/script-tests/tests/devices/device.js @@ -112,7 +112,10 @@ require( timeout: 1000 }; - device.loadURL('http://test.uri/', opts); + device = new Device({'networking': { 'supportsCORS': true }}); + spyOn(device, '_newXMLHttpRequest').and.returnValue(mockXMLHttpRequest); + + device.executeCrossDomainGet('http://test.uri/', opts); expect(mockXMLHttpRequest.timeout).toEqual(1000); });