Chromium Code Reviews| 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 "chrome/browser/ui/tabs/tab_strip_model.h" | 5 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1702 // Now select the last tab. | 1702 // Now select the last tab. |
| 1703 strip.ActivateTabAt(strip.count() - 1, true); | 1703 strip.ActivateTabAt(strip.count() - 1, true); |
| 1704 | 1704 |
| 1705 // Now close the last tab. The next adjacent should be selected. | 1705 // Now close the last tab. The next adjacent should be selected. |
| 1706 strip.CloseWebContentsAt(strip.count() - 1, TabStripModel::CLOSE_NONE); | 1706 strip.CloseWebContentsAt(strip.count() - 1, TabStripModel::CLOSE_NONE); |
| 1707 EXPECT_EQ(page_d_contents, strip.GetWebContentsAt(strip.active_index())); | 1707 EXPECT_EQ(page_d_contents, strip.GetWebContentsAt(strip.active_index())); |
| 1708 | 1708 |
| 1709 strip.CloseAllTabs(); | 1709 strip.CloseAllTabs(); |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 // This fails on linux when run with the rest of unit_tests (crbug.com/302156). | 1712 // This fails on Linux when run with the rest of unit_tests (crbug.com/302156) |
| 1713 #if defined(OS_LINUX) | 1713 // and fails consistently on Mac 64. |
| 1714 #if defined(OS_LINUX) || (defined(OS_MACOSX) && ARCH_CPU_64_BITS) | |
| 1714 #define MAYBE_FastShutdown \ | 1715 #define MAYBE_FastShutdown \ |
|
Nico
2013/10/02 18:22:17
Just disable it for all platforms maybe?
Avi (use Gerrit)
2013/10/02 18:25:31
I feel really awkward killing tests.
| |
| 1715 DISABLED_FastShutdown | 1716 DISABLED_FastShutdown |
| 1716 #else | 1717 #else |
| 1717 #define MAYBE_FastShutdown \ | 1718 #define MAYBE_FastShutdown \ |
| 1718 FastShutdown | 1719 FastShutdown |
| 1719 #endif | 1720 #endif |
| 1720 // Tests that fast shutdown is attempted appropriately. | 1721 // Tests that fast shutdown is attempted appropriately. |
| 1721 TEST_F(TabStripModelTest, MAYBE_FastShutdown) { | 1722 TEST_F(TabStripModelTest, MAYBE_FastShutdown) { |
| 1722 TabStripDummyDelegate delegate; | 1723 TabStripDummyDelegate delegate; |
| 1723 TabStripModel tabstrip(&delegate, profile()); | 1724 TabStripModel tabstrip(&delegate, profile()); |
| 1724 MockTabStripModelObserver observer(&tabstrip); | 1725 MockTabStripModelObserver observer(&tabstrip); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2481 WebContents* moved_contents = strip_src.DetachWebContentsAt(1); | 2482 WebContents* moved_contents = strip_src.DetachWebContentsAt(1); |
| 2482 EXPECT_EQ(contents2, moved_contents); | 2483 EXPECT_EQ(contents2, moved_contents); |
| 2483 | 2484 |
| 2484 // Attach the tab to the destination tab strip. | 2485 // Attach the tab to the destination tab strip. |
| 2485 strip_dst.AppendWebContents(moved_contents, true); | 2486 strip_dst.AppendWebContents(moved_contents, true); |
| 2486 EXPECT_TRUE(strip_dst.IsTabBlocked(0)); | 2487 EXPECT_TRUE(strip_dst.IsTabBlocked(0)); |
| 2487 | 2488 |
| 2488 strip_dst.CloseAllTabs(); | 2489 strip_dst.CloseAllTabs(); |
| 2489 strip_src.CloseAllTabs(); | 2490 strip_src.CloseAllTabs(); |
| 2490 } | 2491 } |
| OLD | NEW |