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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <queue> | 10 #include <queue> |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 &kBodyPath, | 591 &kBodyPath, |
592 &kRawPath, | 592 &kRawPath, |
593 &kRawPath | 593 &kRawPath |
594 }; | 594 }; |
595 // Contents of formData. | 595 // Contents of formData. |
596 const char kFormData[] = | 596 const char kFormData[] = |
597 "{\"A\":[\"test text\"],\"B\":[\"\"],\"C\":[\"test password\"]}"; | 597 "{\"A\":[\"test text\"],\"B\":[\"\"],\"C\":[\"test password\"]}"; |
598 std::unique_ptr<const base::Value> form_data = | 598 std::unique_ptr<const base::Value> form_data = |
599 base::JSONReader::Read(kFormData); | 599 base::JSONReader::Read(kFormData); |
600 ASSERT_TRUE(form_data.get() != NULL); | 600 ASSERT_TRUE(form_data.get() != NULL); |
601 ASSERT_TRUE(form_data->GetType() == base::Value::TYPE_DICTIONARY); | 601 ASSERT_TRUE(form_data->GetType() == base::Value::Type::DICTIONARY); |
602 // Contents of raw. | 602 // Contents of raw. |
603 base::ListValue raw; | 603 base::ListValue raw; |
604 extensions::subtle::AppendKeyValuePair( | 604 extensions::subtle::AppendKeyValuePair( |
605 keys::kRequestBodyRawBytesKey, | 605 keys::kRequestBodyRawBytesKey, |
606 BinaryValue::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length), | 606 BinaryValue::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length), |
607 &raw); | 607 &raw); |
608 extensions::subtle::AppendKeyValuePair( | 608 extensions::subtle::AppendKeyValuePair( |
609 keys::kRequestBodyRawFileKey, | 609 keys::kRequestBodyRawFileKey, |
610 base::MakeUnique<base::StringValue>(std::string()), &raw); | 610 base::MakeUnique<base::StringValue>(std::string()), &raw); |
611 extensions::subtle::AppendKeyValuePair( | 611 extensions::subtle::AppendKeyValuePair( |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2440 EXPECT_TRUE(credentials_set); | 2440 EXPECT_TRUE(credentials_set); |
2441 EXPECT_FALSE(auth3.Empty()); | 2441 EXPECT_FALSE(auth3.Empty()); |
2442 EXPECT_EQ(username, auth1.username()); | 2442 EXPECT_EQ(username, auth1.username()); |
2443 EXPECT_EQ(password, auth1.password()); | 2443 EXPECT_EQ(password, auth1.password()); |
2444 EXPECT_EQ(1u, warning_set.size()); | 2444 EXPECT_EQ(1u, warning_set.size()); |
2445 EXPECT_TRUE(HasWarning(warning_set, "extid2")); | 2445 EXPECT_TRUE(HasWarning(warning_set, "extid2")); |
2446 EXPECT_EQ(3u, capturing_net_log.GetSize()); | 2446 EXPECT_EQ(3u, capturing_net_log.GetSize()); |
2447 } | 2447 } |
2448 | 2448 |
2449 } // namespace extensions | 2449 } // namespace extensions |
OLD | NEW |