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

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

Issue 7432006: Add an experimental permissions API for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if (!installed_extension_) 63 if (!installed_extension_)
64 ui_test_utils::RunMessageLoop(); 64 ui_test_utils::RunMessageLoop();
65 65
66 EXPECT_TRUE(installed_extension_); 66 EXPECT_TRUE(installed_extension_);
67 EXPECT_TRUE(installed_extension_->is_hosted_app()); 67 EXPECT_TRUE(installed_extension_->is_hosted_app());
68 EXPECT_EQ("Test application", installed_extension_->name()); 68 EXPECT_EQ("Test application", installed_extension_->name());
69 EXPECT_EQ("the description is", installed_extension_->description()); 69 EXPECT_EQ("the description is", installed_extension_->description());
70 EXPECT_EQ(extension_misc::LAUNCH_PANEL, 70 EXPECT_EQ(extension_misc::LAUNCH_PANEL,
71 installed_extension_->launch_container()); 71 installed_extension_->launch_container());
72 72
73 ASSERT_EQ(2u, installed_extension_->permission_set()->apis().size()); 73 ASSERT_EQ(2u, installed_extension_->GetActivePermissions()->apis().size());
74 EXPECT_TRUE(installed_extension_->HasAPIPermission( 74 EXPECT_TRUE(installed_extension_->HasAPIPermission(
75 ExtensionAPIPermission::kGeolocation)); 75 ExtensionAPIPermission::kGeolocation));
76 EXPECT_TRUE(installed_extension_->HasAPIPermission( 76 EXPECT_TRUE(installed_extension_->HasAPIPermission(
77 ExtensionAPIPermission::kNotification)); 77 ExtensionAPIPermission::kNotification));
78 78
79 ASSERT_EQ(3u, installed_extension_->icons().map().size()); 79 ASSERT_EQ(3u, installed_extension_->icons().map().size());
80 EXPECT_EQ("icons/16.png", installed_extension_->icons().Get( 80 EXPECT_EQ("icons/16.png", installed_extension_->icons().Get(
81 16, ExtensionIconSet::MATCH_EXACTLY)); 81 16, ExtensionIconSet::MATCH_EXACTLY));
82 EXPECT_EQ("icons/48.png", installed_extension_->icons().Get( 82 EXPECT_EQ("icons/48.png", installed_extension_->icons().Get(
83 48, ExtensionIconSet::MATCH_EXACTLY)); 83 48, ExtensionIconSet::MATCH_EXACTLY));
84 EXPECT_EQ("icons/128.png", installed_extension_->icons().Get( 84 EXPECT_EQ("icons/128.png", installed_extension_->icons().Get(
85 128, ExtensionIconSet::MATCH_EXACTLY)); 85 128, ExtensionIconSet::MATCH_EXACTLY));
86 } 86 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/extensions/convert_web_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698