blob: 6b34f974e1f70b1bba4f75e4e631a43bcdf9ef42 [file] [log] [blame]
Test that XMLHttpRequest raises exceptions when it should.
new XMLHttpRequest()
PASS: req.setRequestHeader("Foo", "bar") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS: req.open("GET", "http://www.apple.com/", true) threw exception Error: Permission denied.
open()
PASS: req.setRequestHeader() threw exception SyntaxError: Not enough arguments.
PASS: req.setRequestHeader("Foo") threw exception SyntaxError: Not enough arguments.
PASS: req.status() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS: req.statusText() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
send()
PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS: req.setRequestHeader("Foo", "bar") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS: req.getResponseHeader() threw exception SyntaxError: Not enough arguments.