| OLD | NEW |
| 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.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 using extensions::AppWindow; | 79 using extensions::AppWindow; |
| 80 using extensions::Extension; | 80 using extensions::Extension; |
| 81 using content::WebContents; | 81 using content::WebContents; |
| 82 | 82 |
| 83 namespace { | 83 namespace { |
| 84 | 84 |
| 85 class TestEvent : public ui::Event { | 85 class TestEvent : public ui::Event { |
| 86 public: | 86 public: |
| 87 explicit TestEvent(ui::EventType type) | 87 explicit TestEvent(ui::EventType type) |
| 88 : ui::Event(type, base::TimeDelta(), 0) { | 88 : ui::Event(type, base::TimeTicks(), 0) {} |
| 89 } | |
| 90 ~TestEvent() override {} | 89 ~TestEvent() override {} |
| 91 | 90 |
| 92 private: | 91 private: |
| 93 DISALLOW_COPY_AND_ASSIGN(TestEvent); | 92 DISALLOW_COPY_AND_ASSIGN(TestEvent); |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 class TestAppWindowRegistryObserver | 95 class TestAppWindowRegistryObserver |
| 97 : public extensions::AppWindowRegistry::Observer { | 96 : public extensions::AppWindowRegistry::Observer { |
| 98 public: | 97 public: |
| 99 explicit TestAppWindowRegistryObserver(Profile* profile) | 98 explicit TestAppWindowRegistryObserver(Profile* profile) |
| (...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 // Close all windows. | 2290 // Close all windows. |
| 2292 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); | 2291 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); |
| 2293 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); | 2292 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); |
| 2294 | 2293 |
| 2295 // Check if "Close" is removed from the context menu. | 2294 // Check if "Close" is removed from the context menu. |
| 2296 std::unique_ptr<LauncherContextMenu> menu2 = | 2295 std::unique_ptr<LauncherContextMenu> menu2 = |
| 2297 CreateLauncherContextMenu(ash::TYPE_BROWSER_SHORTCUT); | 2296 CreateLauncherContextMenu(ash::TYPE_BROWSER_SHORTCUT); |
| 2298 ASSERT_FALSE( | 2297 ASSERT_FALSE( |
| 2299 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); | 2298 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); |
| 2300 } | 2299 } |
| OLD | NEW |