| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h" | 27 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h" |
| 28 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" | 28 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" |
| 29 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h
" | 29 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h
" |
| 30 #include "chrome/browser/ui/browser.h" | 30 #include "chrome/browser/ui/browser.h" |
| 31 #include "chrome/browser/ui/browser_commands.h" | 31 #include "chrome/browser/ui/browser_commands.h" |
| 32 #include "chrome/browser/ui/browser_finder.h" | 32 #include "chrome/browser/ui/browser_finder.h" |
| 33 #include "chrome/browser/ui/browser_list.h" | 33 #include "chrome/browser/ui/browser_list.h" |
| 34 #include "chrome/browser/ui/browser_tabstrip.h" | 34 #include "chrome/browser/ui/browser_tabstrip.h" |
| 35 #include "chrome/browser/ui/host_desktop.h" | 35 #include "chrome/browser/ui/host_desktop.h" |
| 36 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 36 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 37 #include "chrome/common/extensions/extension.h" | |
| 38 #include "chrome/common/extensions/extension_constants.h" | 37 #include "chrome/common/extensions/extension_constants.h" |
| 39 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| 40 #include "chrome/test/base/browser_with_test_window_test.h" | 39 #include "chrome/test/base/browser_with_test_window_test.h" |
| 41 #include "chrome/test/base/testing_pref_service_syncable.h" | 40 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 42 #include "chrome/test/base/testing_profile.h" | 41 #include "chrome/test/base/testing_profile.h" |
| 43 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
| 44 #include "content/public/test/test_browser_thread.h" | 43 #include "content/public/test/test_browser_thread.h" |
| 44 #include "extensions/common/extension.h" |
| 45 #include "extensions/common/manifest_constants.h" | 45 #include "extensions/common/manifest_constants.h" |
| 46 #include "testing/gtest/include/gtest/gtest.h" | 46 #include "testing/gtest/include/gtest/gtest.h" |
| 47 #include "ui/base/models/menu_model.h" | 47 #include "ui/base/models/menu_model.h" |
| 48 | 48 |
| 49 #if defined(OS_CHROMEOS) | 49 #if defined(OS_CHROMEOS) |
| 50 #include "apps/app_window_contents.h" | 50 #include "apps/app_window_contents.h" |
| 51 #include "apps/shell_window_registry.h" | 51 #include "apps/shell_window_registry.h" |
| 52 #include "apps/ui/native_app_window.h" | 52 #include "apps/ui/native_app_window.h" |
| 53 #include "ash/test/test_session_state_delegate.h" | 53 #include "ash/test/test_session_state_delegate.h" |
| 54 #include "ash/test/test_shell_delegate.h" | 54 #include "ash/test/test_shell_delegate.h" |
| (...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2616 | 2616 |
| 2617 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2617 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
| 2618 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2618 ASSERT_EQ(initial_size + 1, model_->items().size()); |
| 2619 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2619 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
| 2620 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2620 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
| 2621 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2621 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
| 2622 | 2622 |
| 2623 launcher_controller_->UnpinAppWithID("1"); | 2623 launcher_controller_->UnpinAppWithID("1"); |
| 2624 ASSERT_EQ(initial_size, model_->items().size()); | 2624 ASSERT_EQ(initial_size, model_->items().size()); |
| 2625 } | 2625 } |
| OLD | NEW |