| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
| 6 #include <queue> | 6 #include <queue> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 EXPECT_EQ("value 5", header_value); | 1608 EXPECT_EQ("value 5", header_value); |
| 1609 EXPECT_EQ(1u, warning_set.size()); | 1609 EXPECT_EQ(1u, warning_set.size()); |
| 1610 EXPECT_TRUE(HasWarning(warning_set, "extid2")); | 1610 EXPECT_TRUE(HasWarning(warning_set, "extid2")); |
| 1611 EXPECT_EQ(3u, capturing_net_log.GetSize()); | 1611 EXPECT_EQ(3u, capturing_net_log.GetSize()); |
| 1612 } | 1612 } |
| 1613 | 1613 |
| 1614 TEST(ExtensionWebRequestHelpersTest, | 1614 TEST(ExtensionWebRequestHelpersTest, |
| 1615 TestMergeOnBeforeSendHeadersResponses_Cookies) { | 1615 TestMergeOnBeforeSendHeadersResponses_Cookies) { |
| 1616 net::HttpRequestHeaders base_headers; | 1616 net::HttpRequestHeaders base_headers; |
| 1617 base_headers.AddHeaderFromString( | 1617 base_headers.AddHeaderFromString( |
| 1618 "Cookie: name=value; name2=value2; name3=value3"); | 1618 "Cookie: name=value; name2=value2; name3=\"value3\""); |
| 1619 net::CapturingBoundNetLog capturing_net_log; | 1619 net::CapturingBoundNetLog capturing_net_log; |
| 1620 net::BoundNetLog net_log = capturing_net_log.bound(); | 1620 net::BoundNetLog net_log = capturing_net_log.bound(); |
| 1621 ExtensionWarningSet warning_set; | 1621 ExtensionWarningSet warning_set; |
| 1622 std::string header_value; | 1622 std::string header_value; |
| 1623 EventResponseDeltas deltas; | 1623 EventResponseDeltas deltas; |
| 1624 | 1624 |
| 1625 linked_ptr<RequestCookieModification> add_cookie = | 1625 linked_ptr<RequestCookieModification> add_cookie = |
| 1626 make_linked_ptr(new RequestCookieModification); | 1626 make_linked_ptr(new RequestCookieModification); |
| 1627 add_cookie->type = helpers::ADD; | 1627 add_cookie->type = helpers::ADD; |
| 1628 add_cookie->modification.reset(new helpers::RequestCookie); | 1628 add_cookie->modification.reset(new helpers::RequestCookie); |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 EXPECT_TRUE(credentials_set); | 2132 EXPECT_TRUE(credentials_set); |
| 2133 EXPECT_FALSE(auth3.Empty()); | 2133 EXPECT_FALSE(auth3.Empty()); |
| 2134 EXPECT_EQ(username, auth1.username()); | 2134 EXPECT_EQ(username, auth1.username()); |
| 2135 EXPECT_EQ(password, auth1.password()); | 2135 EXPECT_EQ(password, auth1.password()); |
| 2136 EXPECT_EQ(1u, warning_set.size()); | 2136 EXPECT_EQ(1u, warning_set.size()); |
| 2137 EXPECT_TRUE(HasWarning(warning_set, "extid2")); | 2137 EXPECT_TRUE(HasWarning(warning_set, "extid2")); |
| 2138 EXPECT_EQ(3u, capturing_net_log.GetSize()); | 2138 EXPECT_EQ(3u, capturing_net_log.GetSize()); |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 } // namespace extensions | 2141 } // namespace extensions |
| OLD | NEW |