| OLD | NEW |
| 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/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
| 10 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" | 10 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 return static_cast<PinnedTabService*>( | 26 return static_cast<PinnedTabService*>( |
| 27 PinnedTabServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 27 PinnedTabServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 28 profile, BuildPinnedTabService)); | 28 profile, BuildPinnedTabService)); |
| 29 } | 29 } |
| 30 | 30 |
| 31 class PinnedTabServiceTest : public BrowserWithTestWindowTest { | 31 class PinnedTabServiceTest : public BrowserWithTestWindowTest { |
| 32 public: | 32 public: |
| 33 PinnedTabServiceTest() : pinned_tab_service_(NULL) {} | 33 PinnedTabServiceTest() : pinned_tab_service_(NULL) {} |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 virtual TestingProfile* CreateProfile() OVERRIDE { | 36 virtual TestingProfile* CreateProfile() override { |
| 37 TestingProfile* profile = BrowserWithTestWindowTest::CreateProfile(); | 37 TestingProfile* profile = BrowserWithTestWindowTest::CreateProfile(); |
| 38 pinned_tab_service_ = BuildForProfile(profile); | 38 pinned_tab_service_ = BuildForProfile(profile); |
| 39 return profile; | 39 return profile; |
| 40 } | 40 } |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 PinnedTabService* pinned_tab_service_; | 43 PinnedTabService* pinned_tab_service_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(PinnedTabServiceTest); | 45 DISALLOW_COPY_AND_ASSIGN(PinnedTabServiceTest); |
| 46 }; | 46 }; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 69 popup->tab_strip_model()->CloseAllTabs(); | 69 popup->tab_strip_model()->CloseAllTabs(); |
| 70 popup.reset(NULL); | 70 popup.reset(NULL); |
| 71 | 71 |
| 72 // Check the state to make sure it hasn't changed. | 72 // Check the state to make sure it hasn't changed. |
| 73 result = PinnedTabTestUtils::TabsToString( | 73 result = PinnedTabTestUtils::TabsToString( |
| 74 PinnedTabCodec::ReadPinnedTabs(profile())); | 74 PinnedTabCodec::ReadPinnedTabs(profile())); |
| 75 EXPECT_EQ("http://www.google.com/::pinned:", result); | 75 EXPECT_EQ("http://www.google.com/::pinned:", result); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| OLD | NEW |