| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
| 64 #include "chrome/test/base/testing_browser_process.h" | 64 #include "chrome/test/base/testing_browser_process.h" |
| 65 #include "chrome/test/base/testing_profile_manager.h" | 65 #include "chrome/test/base/testing_profile_manager.h" |
| 66 #include "components/variations/entropy_provider.h" | 66 #include "components/variations/entropy_provider.h" |
| 67 #include "content/public/browser/web_contents_observer.h" | 67 #include "content/public/browser/web_contents_observer.h" |
| 68 #include "content/public/test/test_utils.h" | 68 #include "content/public/test/test_utils.h" |
| 69 #include "ui/aura/window.h" | 69 #include "ui/aura/window.h" |
| 70 #include "ui/views/test/test_views_delegate.h" | 70 #include "ui/views/test/test_views_delegate.h" |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 using base::ASCIIToUTF16; |
| 73 using extensions::Extension; | 74 using extensions::Extension; |
| 74 using extensions::Manifest; | 75 using extensions::Manifest; |
| 75 using extensions::UnloadedExtensionInfo; | 76 using extensions::UnloadedExtensionInfo; |
| 76 | 77 |
| 77 namespace { | 78 namespace { |
| 78 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; | 79 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; |
| 79 const char* gmail_url = "https://mail.google.com/mail/u"; | 80 const char* gmail_url = "https://mail.google.com/mail/u"; |
| 80 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; | 81 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; |
| 81 | 82 |
| 82 // As defined in /chromeos/dbus/cryptohome_client.cc. | 83 // As defined in /chromeos/dbus/cryptohome_client.cc. |
| (...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2738 | 2739 |
| 2739 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2740 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
| 2740 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2741 ASSERT_EQ(initial_size + 1, model_->items().size()); |
| 2741 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2742 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
| 2742 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2743 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
| 2743 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2744 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
| 2744 | 2745 |
| 2745 launcher_controller_->UnpinAppWithID("1"); | 2746 launcher_controller_->UnpinAppWithID("1"); |
| 2746 ASSERT_EQ(initial_size, model_->items().size()); | 2747 ASSERT_EQ(initial_size, model_->items().size()); |
| 2747 } | 2748 } |
| OLD | NEW |