Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api_unittest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "testing/gtest/include/gtest/gtest-message.h" 61 #include "testing/gtest/include/gtest/gtest-message.h"
62 #include "testing/gtest/include/gtest/gtest.h" 62 #include "testing/gtest/include/gtest/gtest.h"
63 63
64 namespace helpers = extension_web_request_api_helpers; 64 namespace helpers = extension_web_request_api_helpers;
65 namespace keys = extension_web_request_api_constants; 65 namespace keys = extension_web_request_api_constants;
66 namespace web_request = extensions::api::web_request; 66 namespace web_request = extensions::api::web_request;
67 67
68 using base::BinaryValue; 68 using base::BinaryValue;
69 using base::DictionaryValue; 69 using base::DictionaryValue;
70 using base::ListValue; 70 using base::ListValue;
71 using base::StringValue;
72 using base::Time; 71 using base::Time;
73 using base::TimeDelta; 72 using base::TimeDelta;
74 using base::Value; 73 using base::Value;
75 using helpers::CalculateOnAuthRequiredDelta; 74 using helpers::CalculateOnAuthRequiredDelta;
76 using helpers::CalculateOnBeforeRequestDelta; 75 using helpers::CalculateOnBeforeRequestDelta;
77 using helpers::CalculateOnBeforeSendHeadersDelta; 76 using helpers::CalculateOnBeforeSendHeadersDelta;
78 using helpers::CalculateOnHeadersReceivedDelta; 77 using helpers::CalculateOnHeadersReceivedDelta;
79 using helpers::CharListToString; 78 using helpers::CharListToString;
80 using helpers::EventResponseDelta; 79 using helpers::EventResponseDelta;
81 using helpers::EventResponseDeltas; 80 using helpers::EventResponseDeltas;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 ASSERT_TRUE(form_data.get() != NULL); 601 ASSERT_TRUE(form_data.get() != NULL);
603 ASSERT_TRUE(form_data->GetType() == base::Value::Type::DICTIONARY); 602 ASSERT_TRUE(form_data->GetType() == base::Value::Type::DICTIONARY);
604 // Contents of raw. 603 // Contents of raw.
605 base::ListValue raw; 604 base::ListValue raw;
606 extensions::subtle::AppendKeyValuePair( 605 extensions::subtle::AppendKeyValuePair(
607 keys::kRequestBodyRawBytesKey, 606 keys::kRequestBodyRawBytesKey,
608 BinaryValue::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length), 607 BinaryValue::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length),
609 &raw); 608 &raw);
610 extensions::subtle::AppendKeyValuePair( 609 extensions::subtle::AppendKeyValuePair(
611 keys::kRequestBodyRawFileKey, 610 keys::kRequestBodyRawFileKey,
612 base::MakeUnique<base::StringValue>(std::string()), &raw); 611 base::MakeUnique<base::Value>(std::string()), &raw);
613 extensions::subtle::AppendKeyValuePair( 612 extensions::subtle::AppendKeyValuePair(
614 keys::kRequestBodyRawBytesKey, 613 keys::kRequestBodyRawBytesKey,
615 BinaryValue::CreateWithCopiedBuffer(kPlainBlock2, kPlainBlock2Length), 614 BinaryValue::CreateWithCopiedBuffer(kPlainBlock2, kPlainBlock2Length),
616 &raw); 615 &raw);
617 // Summary. 616 // Summary.
618 const base::Value* const kExpected[] = { 617 const base::Value* const kExpected[] = {
619 form_data.get(), 618 form_data.get(),
620 NULL, 619 NULL,
621 &raw, 620 &raw,
622 &raw, 621 &raw,
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 EXPECT_TRUE(credentials_set); 2474 EXPECT_TRUE(credentials_set);
2476 EXPECT_FALSE(auth3.Empty()); 2475 EXPECT_FALSE(auth3.Empty());
2477 EXPECT_EQ(username, auth1.username()); 2476 EXPECT_EQ(username, auth1.username());
2478 EXPECT_EQ(password, auth1.password()); 2477 EXPECT_EQ(password, auth1.password());
2479 EXPECT_EQ(1u, warning_set.size()); 2478 EXPECT_EQ(1u, warning_set.size());
2480 EXPECT_TRUE(HasWarning(warning_set, "extid2")); 2479 EXPECT_TRUE(HasWarning(warning_set, "extid2"));
2481 EXPECT_EQ(3u, capturing_net_log.GetSize()); 2480 EXPECT_EQ(3u, capturing_net_log.GetSize());
2482 } 2481 }
2483 2482
2484 } // namespace extensions 2483 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/chrome_app_sorting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698