OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/task.h" | 5 #include "base/task.h" |
6 #include "base/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
7 #include "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/test/in_process_browser_test.h" | 10 #include "chrome/test/in_process_browser_test.h" |
11 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
12 #include "net/base/cookie_store.h" | 12 #include "net/base/cookie_store.h" |
13 #include "net/base/mock_host_resolver.h" | 13 #include "net/base/mock_host_resolver.h" |
14 #include "net/test/test_server.h" | 14 #include "net/test/test_server.h" |
15 #include "net/url_request/url_request_context.cc" | 15 #include "net/url_request/url_request_context.h" |
wtc
2011/06/03 18:24:40
Wow, no kidding!
This is worth separating into it
rvargas (doing something else)
2011/06/03 18:47:42
Done.
| |
16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class GetCookiesTask : public Task { | 20 class GetCookiesTask : public Task { |
21 public: | 21 public: |
22 GetCookiesTask(const GURL& url, | 22 GetCookiesTask(const GURL& url, |
23 net::URLRequestContextGetter* context_getter, | 23 net::URLRequestContextGetter* context_getter, |
24 base::WaitableEvent* event, | 24 base::WaitableEvent* event, |
25 std::string* cookies) | 25 std::string* cookies) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
111 host_resolver()->AddRule("www.example.com", "127.0.0.1"); | 111 host_resolver()->AddRule("www.example.com", "127.0.0.1"); |
112 | 112 |
113 ui_test_utils::NavigateToURL(browser(), | 113 ui_test_utils::NavigateToURL(browser(), |
114 GURL(url.spec() + redirected_url.spec())); | 114 GURL(url.spec() + redirected_url.spec())); |
115 | 115 |
116 cookie = GetCookies(redirected_url); | 116 cookie = GetCookies(redirected_url); |
117 EXPECT_EQ("cookie2", cookie); | 117 EXPECT_EQ("cookie2", cookie); |
118 } | 118 } |
119 | 119 |
120 } // namespace | 120 } // namespace |
OLD | NEW |