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

Side by Side Diff: chrome/service/cloud_print/cloud_print_token_store_unittest.cc

Issue 8387011: Chrome proxy refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 (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 TEST(CloudPrintTokenStoreTest, Basic) { 9 TEST(CloudPrintTokenStoreTest, Basic) {
10 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); 10 EXPECT_EQ(NULL, CloudPrintTokenStore::current());
11 CloudPrintTokenStore* store = new CloudPrintTokenStore; 11 CloudPrintTokenStore* store = new CloudPrintTokenStore;
12 EXPECT_EQ(store, CloudPrintTokenStore::current()); 12 EXPECT_EQ(store, CloudPrintTokenStore::current());
13 CloudPrintTokenStore::current()->SetToken("myclientlogintoken", false); 13 CloudPrintTokenStore::current()->SetToken("myclientlogintoken");
14 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myclientlogintoken"); 14 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myclientlogintoken");
15 EXPECT_FALSE(CloudPrintTokenStore::current()->token_is_oauth());
16 CloudPrintTokenStore::current()->SetToken("myoauth2token", true);
17 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myoauth2token");
18 EXPECT_TRUE(CloudPrintTokenStore::current()->token_is_oauth());
19 delete store; 15 delete store;
20 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); 16 EXPECT_EQ(NULL, CloudPrintTokenStore::current());
21 } 17 }
22 18
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_token_store.cc ('k') | chrome/service/cloud_print/cloud_print_url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698