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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // Fake gmail extension. | 315 // Fake gmail extension. |
316 base::DictionaryValue manifest_gmail; | 316 base::DictionaryValue manifest_gmail; |
317 manifest_gmail.SetString(extensions::manifest_keys::kName, | 317 manifest_gmail.SetString(extensions::manifest_keys::kName, |
318 "Gmail launcher controller test extension"); | 318 "Gmail launcher controller test extension"); |
319 manifest_gmail.SetString(extensions::manifest_keys::kVersion, "1"); | 319 manifest_gmail.SetString(extensions::manifest_keys::kVersion, "1"); |
320 manifest_gmail.SetString(extensions::manifest_keys::kDescription, | 320 manifest_gmail.SetString(extensions::manifest_keys::kDescription, |
321 "for testing pinned Gmail"); | 321 "for testing pinned Gmail"); |
322 manifest_gmail.SetString(extensions::manifest_keys::kLaunchWebURL, | 322 manifest_gmail.SetString(extensions::manifest_keys::kLaunchWebURL, |
323 kGmailLaunchURL); | 323 kGmailLaunchURL); |
324 base::ListValue* list = new base::ListValue(); | 324 base::ListValue* list = new base::ListValue(); |
325 list->Append(base::Value::CreateStringValue("*://mail.google.com/mail/ca")); | 325 list->Append(new base::StringValue("*://mail.google.com/mail/ca")); |
326 manifest_gmail.Set(extensions::manifest_keys::kWebURLs, list); | 326 manifest_gmail.Set(extensions::manifest_keys::kWebURLs, list); |
327 | 327 |
328 extension3_ = Extension::Create(base::FilePath(), Manifest::UNPACKED, | 328 extension3_ = Extension::Create(base::FilePath(), Manifest::UNPACKED, |
329 manifest_gmail, | 329 manifest_gmail, |
330 Extension::NO_FLAGS, | 330 Extension::NO_FLAGS, |
331 extension_misc::kGmailAppId, | 331 extension_misc::kGmailAppId, |
332 &error); | 332 &error); |
333 | 333 |
334 // Fake search extension. | 334 // Fake search extension. |
335 extension4_ = Extension::Create(base::FilePath(), Manifest::UNPACKED, | 335 extension4_ = Extension::Create(base::FilePath(), Manifest::UNPACKED, |
(...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 | 2692 |
2693 EXPECT_EQ(1, app_icon_loader->fetch_count()); | 2693 EXPECT_EQ(1, app_icon_loader->fetch_count()); |
2694 ASSERT_EQ(initial_size + 1, model_->items().size()); | 2694 ASSERT_EQ(initial_size + 1, model_->items().size()); |
2695 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); | 2695 EXPECT_TRUE(launcher_controller_->IsAppPinned("1")); |
2696 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); | 2696 EXPECT_FALSE(launcher_controller_->IsAppPinned("0")); |
2697 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); | 2697 EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_->items()[app_index].type); |
2698 | 2698 |
2699 launcher_controller_->UnpinAppWithID("1"); | 2699 launcher_controller_->UnpinAppWithID("1"); |
2700 ASSERT_EQ(initial_size, model_->items().size()); | 2700 ASSERT_EQ(initial_size, model_->items().size()); |
2701 } | 2701 } |
OLD | NEW |