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

Side by Side Diff: chrome/browser/webdata/token_service_table_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/webdata/keyword_table.cc ('k') | chrome/common/child_process_logging_posix.cc » ('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 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/webdata/token_service_table.h" 10 #include "chrome/browser/webdata/token_service_table.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 EXPECT_TRUE(table_->GetAllTokens(&out_map)); 83 EXPECT_TRUE(table_->GetAllTokens(&out_map));
84 EXPECT_TRUE(out_map.empty()); 84 EXPECT_TRUE(out_map.empty());
85 85
86 EXPECT_TRUE(table_->SetTokenForService(service, "pepperoni")); 86 EXPECT_TRUE(table_->SetTokenForService(service, "pepperoni"));
87 EXPECT_TRUE(table_->GetAllTokens(&out_map)); 87 EXPECT_TRUE(table_->GetAllTokens(&out_map));
88 EXPECT_EQ(out_map.find(service)->second, "pepperoni"); 88 EXPECT_EQ(out_map.find(service)->second, "pepperoni");
89 out_map.clear(); 89 out_map.clear();
90 90
91 // try blanking it - won't remove it from the db though! 91 // try blanking it - won't remove it from the db though!
92 EXPECT_TRUE(table_->SetTokenForService(service, "")); 92 EXPECT_TRUE(table_->SetTokenForService(service, std::string()));
93 EXPECT_TRUE(table_->GetAllTokens(&out_map)); 93 EXPECT_TRUE(table_->GetAllTokens(&out_map));
94 EXPECT_EQ(out_map.find(service)->second, ""); 94 EXPECT_EQ(out_map.find(service)->second, "");
95 out_map.clear(); 95 out_map.clear();
96 96
97 // try mutating it 97 // try mutating it
98 EXPECT_TRUE(table_->SetTokenForService(service, "ham")); 98 EXPECT_TRUE(table_->SetTokenForService(service, "ham"));
99 EXPECT_TRUE(table_->GetAllTokens(&out_map)); 99 EXPECT_TRUE(table_->GetAllTokens(&out_map));
100 EXPECT_EQ(out_map.find(service)->second, "ham"); 100 EXPECT_EQ(out_map.find(service)->second, "ham");
101 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/keyword_table.cc ('k') | chrome/common/child_process_logging_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698