| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
| 10 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/test/browser_with_test_window_test.h" | 11 #include "chrome/test/browser_with_test_window_test.h" |
| 11 #include "chrome/test/testing_profile.h" | 12 #include "chrome/test/testing_profile.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 typedef BrowserInit::LaunchWithProfile::Tab Tab; | 15 typedef BrowserInit::LaunchWithProfile::Tab Tab; |
| 15 | 16 |
| 16 typedef BrowserWithTestWindowTest PinnedTabCodecTest; | 17 typedef BrowserWithTestWindowTest PinnedTabCodecTest; |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| 19 | 20 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // AddTab inserts at index 0, so order after this is url1, url2. | 56 // AddTab inserts at index 0, so order after this is url1, url2. |
| 56 AddTab(browser(), url1); | 57 AddTab(browser(), url1); |
| 57 | 58 |
| 58 browser()->tabstrip_model()->SetTabPinned(0, true); | 59 browser()->tabstrip_model()->SetTabPinned(0, true); |
| 59 | 60 |
| 60 PinnedTabCodec::WritePinnedTabs(profile()); | 61 PinnedTabCodec::WritePinnedTabs(profile()); |
| 61 | 62 |
| 62 std::string result = TabsToString(PinnedTabCodec::ReadPinnedTabs(profile())); | 63 std::string result = TabsToString(PinnedTabCodec::ReadPinnedTabs(profile())); |
| 63 EXPECT_EQ("http://www.google.com/::pinned:", result); | 64 EXPECT_EQ("http://www.google.com/::pinned:", result); |
| 64 } | 65 } |
| 65 | |
| OLD | NEW |