servo/components/net
bors-servo c519739b7b Auto merge of #11196 - fduraffourg:master, r=jdm
Add unit tests for cookies handling

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #9965

Either:
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

Add unit tests for the `net` component about cookies. The tests are generated
with a new `mach update-net-cookies` command from this repo: https://github.com/abarth/http-state.

This PR also includes two trivial bug fixes about cookie handling.

From all the tests included, the following ones are currently failing:

- cookie_http_state::test_0003
- cookie_http_state::test_0006
- cookie_http_state::test_attribute0004
- cookie_http_state::test_attribute0005
- cookie_http_state::test_attribute0007
- cookie_http_state::test_attribute0008
- cookie_http_state::test_domain0017
- cookie_http_state::test_mozilla0001
- cookie_http_state::test_mozilla0002
- cookie_http_state::test_mozilla0003
- cookie_http_state::test_mozilla0005
- cookie_http_state::test_mozilla0007
- cookie_http_state::test_mozilla0009
- cookie_http_state::test_mozilla0010
- cookie_http_state::test_mozilla0013

`test_000[36]` and `test_mozilla*` are failing because there is currently no
method to clean a `net::cookie_storage` from expired cookies.

`test_attribute000[4578]` are failing because hyper does not parse the `Secure`
attribute correctly. I will open an issue on the upstream project.

`test_domain0017` fails because the TLD .org is not on the PUB_DOMAINS list.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11196)
<!-- Reviewable:end -->
2016-05-17 16:34:16 -07:00
..
fetch Use read_block in http_network_fetch 2016-05-11 09:34:43 -04:00
about_loader.rs Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bluetooth_thread.rs Remove BluetoothDevice members 2016-05-05 12:47:52 +02:00
Cargo.toml Update internal crates to bitflags 0.7 2016-05-17 23:34:04 +02:00
chrome_loader.rs More chrome URL hardenning and tests. 2016-04-23 20:28:03 +02:00
connector.rs Use openssl-verify to check certificate + hostname 2016-05-10 11:30:11 -07:00
cookie.rs read cookie_jar, hsts_list, auth_cache, and local_data from file if profile_dir option is present 2016-04-25 19:39:40 -04:00
cookie_storage.rs Auto merge of #11196 - fduraffourg:master, r=jdm 2016-05-17 16:34:16 -07:00
data_loader.rs Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
file_loader.rs Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
filemanager_thread.rs Fix some warnings 2016-05-11 21:03:12 -07:00
hsts.rs Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
http_loader.rs Move http_loader::Connector to a separate module 2016-05-10 11:20:32 -07:00
image_cache_thread.rs Added Store Command to ImageCache Task 2016-04-26 03:05:15 -04:00
lib.rs Auto merge of #11029 - izgzhen:filemanager_thread, r=Manishearth 2016-05-11 04:28:58 -07:00
mime_classifier.rs Use constructor pattern for ApacheFlag enum. 2016-04-15 18:10:33 -04:00
pub_domains.rs Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
resource_thread.rs Move http_loader::Connector to a separate module 2016-05-10 11:20:32 -07:00
storage_thread.rs read cookie_jar, hsts_list, auth_cache, and local_data from file if profile_dir option is present 2016-04-25 19:39:40 -04:00
websocket_loader.rs Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00