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

Side by Side Diff: components/signin/core/webdata/token_service_table_unittest.cc

Issue 130813003: Create signin component and componentize TokenWebData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/webdata/token_service_table.h" 9 #include "components/signin/core/webdata/token_service_table.h"
10 #include "components/webdata/common/web_database.h" 10 #include "components/webdata/common/web_database.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using base::Time; 13 using base::Time;
14 14
15 class TokenServiceTableTest : public testing::Test { 15 class TokenServiceTableTest : public testing::Test {
16 public: 16 public:
17 TokenServiceTableTest() {} 17 TokenServiceTableTest() {}
18 virtual ~TokenServiceTableTest() {} 18 virtual ~TokenServiceTableTest() {}
19 19
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 service = "testservice"; 108 service = "testservice";
109 service2 = "othertestservice"; 109 service2 = "othertestservice";
110 110
111 EXPECT_TRUE(table_->SetTokenForService(service, "pepperoni")); 111 EXPECT_TRUE(table_->SetTokenForService(service, "pepperoni"));
112 EXPECT_TRUE(table_->SetTokenForService(service2, "steak")); 112 EXPECT_TRUE(table_->SetTokenForService(service2, "steak"));
113 EXPECT_TRUE(table_->RemoveTokenForService(service)); 113 EXPECT_TRUE(table_->RemoveTokenForService(service));
114 EXPECT_TRUE(table_->GetAllTokens(&out_map)); 114 EXPECT_TRUE(table_->GetAllTokens(&out_map));
115 EXPECT_EQ(0u, out_map.count(service)); 115 EXPECT_EQ(0u, out_map.count(service));
116 EXPECT_EQ("steak", out_map.find(service2)->second); 116 EXPECT_EQ("steak", out_map.find(service2)->second);
117 } 117 }
OLDNEW
« no previous file with comments | « components/signin/core/webdata/token_service_table.cc ('k') | components/signin/core/webdata/token_web_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698