blob: 5894960b5b698c80f1a5ba74a6818d753e3e1017 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
(function() {
"use strict";
let fakeXHRCreated = false;
function createXHR() {
let xhr = new window.XMLHttpRequest();
}
for (let i = 0; i < 1000; i++) {
createXHR();
}
// Overwrite XMLHttpRequest
window.XMLHttpRequest = function() {
fakeXHRCreated = true;
}
createXHR();
if (fakeXHRCreated)
testPassed("Overrode XMLHttpRequest");
else
testFailed("Did not override XMLHttpRequest");
})();
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>