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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 using base::ASCIIToUTF16; | 72 using base::ASCIIToUTF16; |
73 using extensions::Extension; | 73 using extensions::Extension; |
74 using extensions::Manifest; | 74 using extensions::Manifest; |
75 using extensions::UnloadedExtensionInfo; | 75 using extensions::UnloadedExtensionInfo; |
76 | 76 |
77 namespace { | 77 namespace { |
78 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; | 78 const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; |
79 const char* gmail_url = "https://mail.google.com/mail/u"; | 79 const char* gmail_url = "https://mail.google.com/mail/u"; |
80 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; | 80 const char* kGmailLaunchURL = "https://mail.google.com/mail/ca"; |
81 | 81 |
82 #if defined(OS_CHROMEOS) | |
83 // As defined in /chromeos/dbus/cryptohome_client.cc. | 82 // As defined in /chromeos/dbus/cryptohome_client.cc. |
84 const char kUserIdHashSuffix[] = "-hash"; | 83 const char kUserIdHashSuffix[] = "-hash"; |
85 | 84 |
86 // An extension prefix. | 85 // An extension prefix. |
87 const char kCrxAppPrefix[] = "_crx_"; | 86 const char kCrxAppPrefix[] = "_crx_"; |
88 #endif | |
89 | 87 |
90 // ShelfModelObserver implementation that tracks what messages are invoked. | 88 // ShelfModelObserver implementation that tracks what messages are invoked. |
91 class TestShelfModelObserver : public ash::ShelfModelObserver { | 89 class TestShelfModelObserver : public ash::ShelfModelObserver { |
92 public: | 90 public: |
93 TestShelfModelObserver() | 91 TestShelfModelObserver() |
94 : added_(0), | 92 : added_(0), |
95 removed_(0), | 93 removed_(0), |
96 changed_(0) { | 94 changed_(0) { |
97 } | 95 } |
98 | 96 |
(...skipping 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2700 | 2698 |
2701 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2699 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2702 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2700 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2703 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2701 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2704 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2702 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2705 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2703 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2706 | 2704 |
2707 launcher_controller_->UnpinAppWithID("1"); | 2705 launcher_controller_->UnpinAppWithID("1"); |
2708 ASSERT_EQ(initial_size, model_->items().size()); | 2706 ASSERT_EQ(initial_size, model_->items().size()); |
2709 } | 2707 } |
OLD | NEW |