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

Side by Side Diff: chrome/browser/tabs/pinned_tab_service_unittest.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 (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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "chrome/browser/tabs/pinned_tab_codec.h" 8 #include "chrome/browser/tabs/pinned_tab_codec.h"
9 #include "chrome/browser/tabs/pinned_tab_service.h" 9 #include "chrome/browser/tabs/pinned_tab_service.h"
10 #include "chrome/browser/tabs/pinned_tab_service_factory.h" 10 #include "chrome/browser/tabs/pinned_tab_service_factory.h"
11 #include "chrome/browser/tabs/pinned_tab_test_utils.h" 11 #include "chrome/browser/tabs/pinned_tab_test_utils.h"
12 #include "chrome/browser/tabs/tab_strip_model.h" 12 #include "chrome/browser/tabs/tab_strip_model.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/test/base/browser_with_test_window_test.h" 14 #include "chrome/test/base/browser_with_test_window_test.h"
15 #include "chrome/test/base/testing_profile.h" 15 #include "chrome/test/base/testing_profile.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace { 18 namespace {
19 19
20 ProfileKeyedBase* BuildPinnedTabService(Profile* profile) { 20 ProfileKeyedService* BuildPinnedTabService(Profile* profile) {
21 return new PinnedTabService(profile); 21 return new PinnedTabService(profile);
22 } 22 }
23 23
24 PinnedTabService* BuildForProfile(Profile* profile) { 24 PinnedTabService* BuildForProfile(Profile* profile) {
25 return static_cast<PinnedTabService*>( 25 return static_cast<PinnedTabService*>(
26 PinnedTabServiceFactory::GetInstance()->SetTestingFactoryAndUse( 26 PinnedTabServiceFactory::GetInstance()->SetTestingFactoryAndUse(
27 profile, BuildPinnedTabService)); 27 profile, BuildPinnedTabService));
28 } 28 }
29 29
30 class PinnedTabServiceTest : public BrowserWithTestWindowTest { 30 class PinnedTabServiceTest : public BrowserWithTestWindowTest {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 popup.reset(NULL); 68 popup.reset(NULL);
69 popup_window.reset(NULL); 69 popup_window.reset(NULL);
70 70
71 // Check the state to make sure it hasn't changed. 71 // Check the state to make sure it hasn't changed.
72 result = PinnedTabTestUtils::TabsToString( 72 result = PinnedTabTestUtils::TabsToString(
73 PinnedTabCodec::ReadPinnedTabs(profile())); 73 PinnedTabCodec::ReadPinnedTabs(profile()));
74 EXPECT_EQ("http://www.google.com/::pinned:", result); 74 EXPECT_EQ("http://www.google.com/::pinned:", result);
75 } 75 }
76 76
77 } // namespace 77 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_wizard_unittest.cc ('k') | chrome/browser/ui/webui/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698