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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc

Issue 2709483008: Disable flaky test ShelfAppBrowserTest.MatchingShelfIDandActiveTab (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/common/shelf/app_list_button.h" 9 #include "ash/common/shelf/app_list_button.h"
10 #include "ash/common/shelf/shelf_button.h" 10 #include "ash/common/shelf/shelf_button.h"
(...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 2144
2145 // Activate again. This doesn't create new browser, it activates the window. 2145 // Activate again. This doesn't create new browser, it activates the window.
2146 SelectItem(item_controller, ui::ET_UNKNOWN); 2146 SelectItem(item_controller, ui::ET_UNKNOWN);
2147 running_browser = chrome::GetTotalBrowserCount(); 2147 running_browser = chrome::GetTotalBrowserCount();
2148 EXPECT_EQ(1u, running_browser); 2148 EXPECT_EQ(1u, running_browser);
2149 EXPECT_TRUE(controller_->IsOpen(id)); 2149 EXPECT_TRUE(controller_->IsOpen(id));
2150 EXPECT_FALSE(window_state->IsMinimized()); 2150 EXPECT_FALSE(window_state->IsMinimized());
2151 } 2151 }
2152 2152
2153 // Check that the window's ShelfID property matches that of the active tab. 2153 // Check that the window's ShelfID property matches that of the active tab.
2154 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, MatchingShelfIDandActiveTab) { 2154 // TODO(https://crbug.com/694941): Disabled due to flakiness.
2155 IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest,
2156 DISABLED_MatchingShelfIDandActiveTab) {
2155 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 2157 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
2156 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 2158 EXPECT_EQ(1, browser()->tab_strip_model()->count());
2157 EXPECT_EQ(0, browser()->tab_strip_model()->active_index()); 2159 EXPECT_EQ(0, browser()->tab_strip_model()->active_index());
2158 EXPECT_EQ(2, model_->item_count()); 2160 EXPECT_EQ(2, model_->item_count());
2159 2161
2160 ash::WmWindow* window = 2162 ash::WmWindow* window =
2161 ash::WmWindow::Get(browser()->window()->GetNativeWindow()); 2163 ash::WmWindow::Get(browser()->window()->GetNativeWindow());
2162 2164
2163 int browser_index = GetIndexOfShelfItemType(ash::TYPE_BROWSER_SHORTCUT); 2165 int browser_index = GetIndexOfShelfItemType(ash::TYPE_BROWSER_SHORTCUT);
2164 ash::ShelfID browser_id = model_->items()[browser_index].id; 2166 ash::ShelfID browser_id = model_->items()[browser_index].id;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 2394
2393 // Close all windows via the menu item. 2395 // Close all windows via the menu item.
2394 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); 2396 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE);
2395 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); 2397 EXPECT_EQ(0u, BrowserList::GetInstance()->size());
2396 2398
2397 // Check if "Close" is removed from the context menu. 2399 // Check if "Close" is removed from the context menu.
2398 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); 2400 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu();
2399 ASSERT_FALSE( 2401 ASSERT_FALSE(
2400 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); 2402 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE));
2401 } 2403 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698