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

Side by Side Diff: sync/protocol/proto_value_conversions_unittest.cc

Issue 101573003: Add the navigation redirect-chain to Sync sessions proto for offline analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Brett's comment on patch set 46, and rebase. Created 6 years, 8 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
« no previous file with comments | « sync/protocol/proto_value_conversions.cc ('k') | sync/protocol/session_specifics.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Keep this file in sync with the .proto files in this directory. 5 // Keep this file in sync with the .proto files in this directory.
6 6
7 #include "sync/protocol/proto_value_conversions.h" 7 #include "sync/protocol/proto_value_conversions.h"
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 TEST_F(ProtoValueConversionsTest, SessionWindowToValue) { 79 TEST_F(ProtoValueConversionsTest, SessionWindowToValue) {
80 TestSpecificsToValue(SessionWindowToValue); 80 TestSpecificsToValue(SessionWindowToValue);
81 } 81 }
82 82
83 TEST_F(ProtoValueConversionsTest, TabNavigationToValue) { 83 TEST_F(ProtoValueConversionsTest, TabNavigationToValue) {
84 TestSpecificsToValue(TabNavigationToValue); 84 TestSpecificsToValue(TabNavigationToValue);
85 } 85 }
86 86
87 TEST_F(ProtoValueConversionsTest, NavigationRedirectToValue) {
88 TestSpecificsToValue(NavigationRedirectToValue);
89 }
90
87 TEST_F(ProtoValueConversionsTest, PasswordSpecificsData) { 91 TEST_F(ProtoValueConversionsTest, PasswordSpecificsData) {
88 sync_pb::PasswordSpecificsData specifics; 92 sync_pb::PasswordSpecificsData specifics;
89 specifics.set_password_value("secret"); 93 specifics.set_password_value("secret");
90 scoped_ptr<base::DictionaryValue> value( 94 scoped_ptr<base::DictionaryValue> value(
91 PasswordSpecificsDataToValue(specifics)); 95 PasswordSpecificsDataToValue(specifics));
92 EXPECT_FALSE(value->empty()); 96 EXPECT_FALSE(value->empty());
93 std::string password_value; 97 std::string password_value;
94 EXPECT_TRUE(value->GetString("password_value", &password_value)); 98 EXPECT_TRUE(value->GetString("password_value", &password_value));
95 EXPECT_EQ("<redacted>", password_value); 99 EXPECT_EQ("<redacted>", password_value);
96 } 100 }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), 371 EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()),
368 "get_updates.entries")); 372 "get_updates.entries"));
369 } 373 }
370 374
371 TEST_F(ProtoValueConversionsTest, AttachmentIdProtoToValue) { 375 TEST_F(ProtoValueConversionsTest, AttachmentIdProtoToValue) {
372 TestSpecificsToValue(AttachmentIdProtoToValue); 376 TestSpecificsToValue(AttachmentIdProtoToValue);
373 } 377 }
374 378
375 } // namespace 379 } // namespace
376 } // namespace syncer 380 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_value_conversions.cc ('k') | sync/protocol/session_specifics.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698