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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_tabstrip.h"
9 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 10 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
10 #include "chrome/browser/ui/tabs/pinned_tab_service.h" 11 #include "chrome/browser/ui/tabs/pinned_tab_service.h"
11 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h" 12 #include "chrome/browser/ui/tabs/pinned_tab_service_factory.h"
12 #include "chrome/browser/ui/tabs/pinned_tab_test_utils.h" 13 #include "chrome/browser/ui/tabs/pinned_tab_test_utils.h"
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
14 #include "chrome/test/base/browser_with_test_window_test.h" 15 #include "chrome/test/base/browser_with_test_window_test.h"
15 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 namespace { 19 namespace {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 59
59 // Close the browser. This should trigger saving the tabs. No need to destroy 60 // Close the browser. This should trigger saving the tabs. No need to destroy
60 // the browser (this happens automatically in the test destructor). 61 // the browser (this happens automatically in the test destructor).
61 browser()->OnWindowClosing(); 62 browser()->OnWindowClosing();
62 63
63 std::string result = PinnedTabTestUtils::TabsToString( 64 std::string result = PinnedTabTestUtils::TabsToString(
64 PinnedTabCodec::ReadPinnedTabs(profile())); 65 PinnedTabCodec::ReadPinnedTabs(profile()));
65 EXPECT_EQ("http://www.google.com/::pinned:", result); 66 EXPECT_EQ("http://www.google.com/::pinned:", result);
66 67
67 // Close the popup. This shouldn't reset the saved state. 68 // Close the popup. This shouldn't reset the saved state.
68 popup->CloseAllTabs(); 69 chrome::CloseAllTabs(popup.get());
69 popup.reset(NULL); 70 popup.reset(NULL);
70 popup_window.reset(NULL); 71 popup_window.reset(NULL);
71 72
72 // Check the state to make sure it hasn't changed. 73 // Check the state to make sure it hasn't changed.
73 result = PinnedTabTestUtils::TabsToString( 74 result = PinnedTabTestUtils::TabsToString(
74 PinnedTabCodec::ReadPinnedTabs(profile())); 75 PinnedTabCodec::ReadPinnedTabs(profile()));
75 EXPECT_EQ("http://www.google.com/::pinned:", result); 76 EXPECT_EQ("http://www.google.com/::pinned:", result);
76 } 77 }
77 78
78 } // namespace 79 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698