- 05 5月, 2016 4 次提交
-
-
由 Mislav Marohnić 提交于
-
由 David Graham 提交于
Firefox and Chrome trigger the request's `onerror` handler when a timeout occurs. Safari triggers the `ontimeout` handler. This can be observed by making a request to an unroutable address: var xhr = new XMLHttpRequest() xhr.onload = console.log.bind(console, 'loaded') xhr.onerror = console.log.bind(console, 'errored') xhr.ontimeout = console.log.bind(console, 'timeout') xhr.open('GET', 'http://10.255.255.1') xhr.send() Fixes #294.
-
由 Steven Luscher 提交于
From https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#getAllResponseHeaders(): > Returns all the response headers, separated by CRLF, as a string, or null if no response has been received. I discovered this on Android, once when `xhr.getAllResponseHeaders()` evaluated to `null`.
-
由 David Graham 提交于
-
- 19 1月, 2016 4 次提交
-
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
Handle cases where `self` isn't defined
-
由 James Billingham 提交于
-
由 David Graham 提交于
-
- 18 1月, 2016 5 次提交
-
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
Exercise both polyfill and native `fetch` in test suite
-
由 Mislav Marohnić 提交于
When exercising the polyfill in Firefox, the invalid JSON parsing error will cripple the test suite, causing cascading failures in Mocha HTML output as well as cause failures in unrelated tests. The code fix was proposed #157 but we decided not to pull it since it's a Firefox bug and Firefox now ships with native fetch anyway. Instead, we avoid running that test as part of our polyfill test suite.
-
- 13 1月, 2016 7 次提交
-
-
由 Mislav Marohnić 提交于
Mysteriously, it doesn't implement it.
-
由 Mislav Marohnić 提交于
This is opposed to checking for native ArrayBuffer because the polyfill will only define `arrayBuffer()` methods if Blob is available.
-
由 Mislav Marohnić 提交于
Before, in browsers that had native `fetch` implementation the polyfill code was never exercised by the test suite. This ensures that both implementations are exercised.
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
If someone just cloned this project, they might be tempted to `script/server` and try to run the test suite immediately. That won't work, because they have to run `make` first to obtain all npm and bower dependencies. However, they would get a blank HTML page which would be confusing because it's not immediately apparent what they did wrong. Now, an error message is rendered that suggests you should run `make`.
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
-
- 11 1月, 2016 1 次提交
-
-
由 Mislav Marohnić 提交于
-
- 10 1月, 2016 2 次提交
-
-
由 David Graham 提交于
-
由 Emily Eisenberg 提交于
-
- 09 1月, 2016 1 次提交
-
-
由 Emily Eisenberg 提交于
Summary: The process of extracting a body from a passed in body object (described here: https://fetch.spec.whatwg.org/#concept-bodyinit-extract) creates both a byte stream and a corresponding `Content-Type` value. These two values are used in the constructor of `Request` and `Response` objects to initialize the body and to set an initial `Content-Type` header. This change makes `Body._initBody()` return the `Content-Type` value corresponding to the type of the object passed in, and to set that header in the corresponding `Request` and `Response` objects that are being constructed. There's a little bit of a dance I need to do in Request to keep track of where the body is coming from, because we're only supposed to be setting the `Content-Type` header if we're getting the body from the options passed in, not if we're copying it from another `Request`. See step 32 of https://fetch.spec.whatwg.org/#dom-request. (This was caught by one of the tests. Yay tests!) I added some corresponding tests to make sure this works. Test Plan: I'm a little bit confused about how to run the tests normally, but this is what I did: - Run `make lint`, see that everything passes - Start up the test server by running `node script/server 3900 &` - Visit http://localhost:3900/test/test.html and http://localhost:3900/test/test-worker.html in Chrome and see that all of the tests pass. From what I can tell, running the tests in Chrome just used the native fetch objects, so to test the polyfill I added `window.fetch = null` in test/test.html before it includes '../fetch.js', and added `self.fetch = null` in test/worker.js before it imports '../fetch.js'. Then: - Visit http://localhost:3900/test/test.html and http://localhost:3900/test/test-worker.html in Chrome and see that all of the tests pass. Reviewers: @jeresig
-
- 03 11月, 2015 3 次提交
-
-
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
Allow making a POST request with an ArrayBuffer body
-
- 01 11月, 2015 1 次提交
-
-
由 Joshua Warner 提交于
-
- 31 10月, 2015 1 次提交
-
-
由 Mislav Marohnić 提交于
Run Sauce Labs CI for pull requests
-
- 12 10月, 2015 11 次提交
-
-
由 Mislav Marohnić 提交于
[ci skip]
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
Closes #209, fixes #185
-
由 Mislav Marohnić 提交于
-
由 Mislav Marohnić 提交于
-
-
由 Mislav Marohnić 提交于
Remove moot `version` property from bower.json
-
由 Mislav Marohnić 提交于
Every request now goes through general-purpose `saucelabs-api` command which, by default, dumps the data in line-based format suitable for parsing on the command line. If `--raw` is passed, raw JSON is returned instead.
-
由 Mislav Marohnić 提交于
Disable Travis' own Sauce Labs integration
-
由 Mislav Marohnić 提交于
Use absolute URL in Response.redirect test
-
由 Bryan Smith 提交于
Avoids an issue where native implementations resolve and expand the URL.
-