Граф коммитов

238 Коммитов

Автор SHA1 Сообщение Дата
David Graham a1c1b79abf Fix form post content type test. 2014-11-01 17:50:22 -06:00
Mislav Marohnić d5a000df93 Fixes 204 No Content responses for IE 9
IE 9 fails on 204s with error code 1223
http://www.enhanceie.com/ie/bugs.asp

Rewrite the code back to 204. Note: response headers remain unavailable
in this case. This was fixed in IE 10.
2014-10-31 13:57:21 +01:00
Mislav Marohnić 5a2d5f860b Fix promise being rejected on IE 9 when server response is invalid
Reject all HTTP codes that are not in the 100..599 range.

When an empty reply is received from the server, `xhr.onerror` callback
should get triggered. IE 9, however, triggers the `onload` callback with
status code 12152 that stands for:

    ERROR_HTTP_INVALID_SERVER_RESPONSE
    The server response could not be parsed.

http://support.microsoft.com/kb/193625
2014-10-31 13:56:29 +01:00
Mislav Marohnić eea856859e Fix test that reads "Date" header on IE
IE caches xhr responses pretty aggressively and after restoring the
previous response from cache, it blanks out the "Date" header (probably
by design). The solution for this test is to use a cache-busting query
parameter.
2014-10-31 13:56:29 +01:00
Mislav Marohnić 6746b891c0 Fix test suite CSS for IE
By default, all static files served from the test server were
"text/plain". IE auto-detects HTML and JavaScript content as such, but
refuses to display the style sheet until it is served as "text/css".
2014-10-31 13:56:29 +01:00
Mislav Marohnić b922decb34 Compensate for the broken PATCH support in PhantomJS
PhantomJS doesn't seem to send request body for PATCH:
https://github.com/ariya/phantomjs/issues/11384
2014-10-31 13:56:29 +01:00
Mislav Marohnić dcc3e82a8d Normalize capitalization of HTTP methods per fetch spec
Now only the whitelisted method names get normalized by uppercasing and
the rest are left untouched since HTTP method names in general are
case-sensitive.

In tests we must use `PATCH` (uppercase) because Node.js server doesn't
support `patch` (lowercase).
2014-10-31 13:56:29 +01:00
Mislav Marohnić c71f1dd9bb Uppercase the HTTP method name
This fixes PUT/DELETE for IE 9 and PATCH for Node.js.
2014-10-31 13:56:01 +01:00
Mislav Marohnić 79f74952cc Auto-detect available port when running headless tests
By default the test server tried to run on port 3000, which would fail
with a misleading message if something else happened to occupy that port
on the system (such as a Rails app).

Now start incrementing the port number from 3900 and stop when the port
is found to be available.
2014-10-30 13:27:49 +01:00
Joshua Peek fc6f4519fc Feature detect blob support 2014-10-16 10:38:53 -07:00
Joshua Peek c02cad221e Skip blob tests on phantom 2014-10-15 18:44:53 -07:00
Joshua Peek 81c857f30f Add basic run script 2014-10-15 18:40:45 -07:00
Joshua Peek ded306d039 Set test timeout 2014-10-15 18:31:08 -07:00
Joshua Peek 11fb87ed27 Fix duplicate content type 2014-10-15 18:22:56 -07:00
Joshua Peek 503786ce7b Move under test 2014-10-15 18:20:40 -07:00
Joshua Peek c568f1affb Test server connection error 2014-10-15 18:18:36 -07:00
Joshua Peek 3316bdaf03 Add test server 2014-10-15 16:06:40 -07:00
Joshua Peek e61377fecb Allow sub lint in tests 2014-10-15 15:40:26 -07:00
Joshua Peek 6f6239927b No need for es3 for tests 2014-10-15 15:38:01 -07:00
Zirak e428559a68 Fixed uncaught error when a body was consumed more than once.
Ammended tets to also check error message, not just type.
2014-10-15 23:45:25 +03:00
David Graham 66c4948586 Merge pull request #8 from github/form-data
Parse form encoded response body
2014-10-15 10:19:55 -06:00
David Graham 60271cef8a Parse form encoded response body. 2014-10-14 21:48:49 -06:00
David Graham c7a27dc12f Allow body to be consumed a single time. 2014-10-14 20:35:24 -06:00
David Graham ce9abcced4 Test network failure rejects promise. 2014-10-13 15:25:01 -06:00
David Graham 9bdada53c3 Test promise is resolved for non-200 response. 2014-10-13 15:23:25 -06:00
David Graham ef2ce741b0 Missed a var. 2014-10-13 15:12:04 -06:00
David Graham 219bda9abe Test response header parsing. 2014-10-13 15:11:19 -06:00
David Graham 41b622d922 Respond with optional headers. 2014-10-13 15:10:58 -06:00
David Graham a2331840be Remove unused parameters. 2014-10-13 14:56:00 -06:00
David Graham d7273325c2 Test post content-type header. 2014-10-13 14:53:36 -06:00
David Graham 3bca288404 Test posted form data encoding. 2014-10-13 14:50:59 -06:00
David Graham 585453bd8f Test request headers. 2014-10-13 14:48:53 -06:00
David Graham 8c18ecc54a Test get method. 2014-10-13 14:48:38 -06:00
David Graham c38cfe25fc Track mock requests. 2014-10-13 14:48:21 -06:00
David Graham affb781dcd Test blob promise. 2014-10-13 14:28:30 -06:00
David Graham df0f9bb586 Add text promise test. 2014-10-13 14:25:12 -06:00
David Graham f95e98c8c5 Add json tests. 2014-10-13 14:23:45 -06:00
David Graham 44e796a874 Start tests. 2014-10-12 18:22:45 -06:00