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 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 | 523 |
524 // Add a pinned non-app tab. | 524 // Add a pinned non-app tab. |
525 browser()->NewTab(); | 525 browser()->NewTab(); |
526 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 526 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
527 model->SetTabPinned(2, true); | 527 model->SetTabPinned(2, true); |
528 | 528 |
529 // Write out the pinned tabs. | 529 // Write out the pinned tabs. |
530 PinnedTabCodec::WritePinnedTabs(browser()->profile()); | 530 PinnedTabCodec::WritePinnedTabs(browser()->profile()); |
531 | 531 |
532 // Simulate launching again. | 532 // Simulate launching again. |
533 CommandLine dummy(CommandLine::ARGUMENTS_ONLY); | 533 CommandLine dummy(CommandLine::NO_PROGRAM); |
534 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); | 534 BrowserInit::LaunchWithProfile launch(FilePath(), dummy); |
535 launch.profile_ = browser()->profile(); | 535 launch.profile_ = browser()->profile(); |
536 launch.ProcessStartupURLs(std::vector<GURL>()); | 536 launch.ProcessStartupURLs(std::vector<GURL>()); |
537 | 537 |
538 // The launch should have created a new browser. | 538 // The launch should have created a new browser. |
539 ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile())); | 539 ASSERT_EQ(2u, BrowserList::GetBrowserCount(browser()->profile())); |
540 | 540 |
541 // Find the new browser. | 541 // Find the new browser. |
542 Browser* new_browser = NULL; | 542 Browser* new_browser = NULL; |
543 for (BrowserList::const_iterator i = BrowserList::begin(); | 543 for (BrowserList::const_iterator i = BrowserList::begin(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 | 658 |
659 // The normal browser should now have four. | 659 // The normal browser should now have four. |
660 EXPECT_EQ(4, browser()->tab_count()); | 660 EXPECT_EQ(4, browser()->tab_count()); |
661 | 661 |
662 // Close the additional browsers. | 662 // Close the additional browsers. |
663 popup_browser->CloseAllTabs(); | 663 popup_browser->CloseAllTabs(); |
664 app_browser->CloseAllTabs(); | 664 app_browser->CloseAllTabs(); |
665 app_popup_browser->CloseAllTabs(); | 665 app_popup_browser->CloseAllTabs(); |
666 } | 666 } |
667 #endif | 667 #endif |
OLD | NEW |