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 3 // found in the LICENSE file. 4 5 #include "chrome/service/cloud_print/cloud_print_token_store.h" 6 7 #include "testing/gtest/include/gtest/gtest.h" 8 9 namespace cloud_print { 10 11 TEST(CloudPrintTokenStoreTest, Basic) { 12 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); 13 CloudPrintTokenStore* store = new CloudPrintTokenStore; 14 EXPECT_EQ(store, CloudPrintTokenStore::current()); 15 CloudPrintTokenStore::current()->SetToken("myclientlogintoken"); 16 EXPECT_EQ(CloudPrintTokenStore::current()->token(), "myclientlogintoken"); 17 delete store; 18 EXPECT_EQ(NULL, CloudPrintTokenStore::current()); 19 } 20 21 } // namespace cloud_print 22