Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: chrome/browser/extensions/convert_web_app_browsertest.cc

Issue 14241002: Move the parsing of app.launch related keys out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/common/chrome_notification_types.h" 11 #include "chrome/common/chrome_notification_types.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/extensions/app_launcher_info.h"
13 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
14 #include "chrome/common/extensions/extension_icon_set.h" 15 #include "chrome/common/extensions/extension_icon_set.h"
15 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" 16 #include "chrome/common/extensions/manifest_handlers/icons_handler.h"
16 #include "chrome/common/extensions/permissions/permission_set.h" 17 #include "chrome/common/extensions/permissions/permission_set.h"
17 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
18 #include "chrome/test/base/ui_test_utils.h" 19 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/notification_details.h" 20 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
22 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 "chrome.send('generateAppForLink', " 75 "chrome.send('generateAppForLink', "
75 "['http://www.example.com', 'Test application', 0])")); 76 "['http://www.example.com', 'Test application', 0])"));
76 77
77 if (!installed_extension_) 78 if (!installed_extension_)
78 content::RunMessageLoop(); 79 content::RunMessageLoop();
79 80
80 EXPECT_TRUE(installed_extension_); 81 EXPECT_TRUE(installed_extension_);
81 EXPECT_TRUE(installed_extension_->is_hosted_app()); 82 EXPECT_TRUE(installed_extension_->is_hosted_app());
82 EXPECT_EQ("Test application", installed_extension_->name()); 83 EXPECT_EQ("Test application", installed_extension_->name());
83 EXPECT_EQ("", installed_extension_->description()); 84 EXPECT_EQ("", installed_extension_->description());
84 EXPECT_EQ("http://www.example.com/", installed_extension_->launch_web_url()); 85 EXPECT_EQ("http://www.example.com/",
86 AppLauncherInfo::GetLaunchWebURL(installed_extension_));
85 EXPECT_EQ(extension_misc::LAUNCH_TAB, 87 EXPECT_EQ(extension_misc::LAUNCH_TAB,
86 installed_extension_->launch_container()); 88 AppLauncherInfo::GetLaunchContainer(installed_extension_));
87 EXPECT_EQ(0u, installed_extension_->GetActivePermissions()->apis().size()); 89 EXPECT_EQ(0u, installed_extension_->GetActivePermissions()->apis().size());
88 EXPECT_EQ(0u, IconsInfo::GetIcons(installed_extension_).map().size()); 90 EXPECT_EQ(0u, IconsInfo::GetIcons(installed_extension_).map().size());
89 } 91 }
90 92
91 } // namespace extensions 93 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698