OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/service/cloud_print/cloud_print_token_store.h" | 5 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
| 9 namespace cloud_print { |
| 10 |
9 TEST(CloudPrintTokenStoreTest, Basic) { | 11 TEST(CloudPrintTokenStoreTest, Basic) { |
10 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); | 12 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); |
11 CloudPrintTokenStore* store = new CloudPrintTokenStore; | 13 CloudPrintTokenStore* store = new CloudPrintTokenStore; |
12 EXPECT_EQ(store, CloudPrintTokenStore::current()); | 14 EXPECT_EQ(store, CloudPrintTokenStore::current()); |
13 CloudPrintTokenStore::current()->SetToken("myclientlogintoken"); | 15 CloudPrintTokenStore::current()->SetToken("myclientlogintoken"); |
14 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myclientlogintoken"); | 16 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myclientlogintoken"); |
15 delete store; | 17 delete store; |
16 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); | 18 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); |
17 } | 19 } |
18 | 20 |
| 21 } // namespace cloud_print |
OLD | NEW |