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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 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/signin/signin_manager.h" 5 #include "chrome/browser/signin/signin_manager.h"
6 #include "chrome/browser/signin/signin_manager_factory.h" 6 #include "chrome/browser/signin/signin_manager_factory.h"
7 #include "chrome/common/extensions/extension.h" 7 #include "chrome/common/extensions/extension.h"
8 #include "chrome/common/extensions/extension_builder.h" 8 #include "chrome/common/extensions/extension_builder.h"
9 #include "chrome/common/extensions/permissions/permissions_data.h" 9 #include "chrome/common/extensions/permissions/permissions_data.h"
10 #include "chrome/test/base/testing_browser_process.h" 10 #include "chrome/test/base/testing_browser_process.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 content::MockRenderProcessHost normal_process(profile_); 66 content::MockRenderProcessHost normal_process(profile_);
67 SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile_); 67 SigninManager* signin_manager = SigninManagerFactory::GetForProfile(profile_);
68 ASSERT_TRUE(signin_manager); 68 ASSERT_TRUE(signin_manager);
69 signin_manager->SetSigninProcess(signin_process.GetID()); 69 signin_manager->SetSigninProcess(signin_process.GetID());
70 70
71 scoped_refptr<const Extension> extension(CreateTestExtension("a")); 71 scoped_refptr<const Extension> extension(CreateTestExtension("a"));
72 std::string error; 72 std::string error;
73 73
74 // The same call should succeed with a normal process, but fail with a signin 74 // The same call should succeed with a normal process, but fail with a signin
75 // process. 75 // process.
76 EXPECT_TRUE(PermissionsData::CanExecuteScriptOnPage(extension, 76 EXPECT_TRUE(PermissionsData::CanExecuteScriptOnPage(extension.get(),
77 kSigninUrl, 77 kSigninUrl,
78 kSigninUrl, 78 kSigninUrl,
79 -1, 79 -1,
80 NULL, 80 NULL,
81 normal_process.GetID(), 81 normal_process.GetID(),
82 &error)) << error; 82 &error)) << error;
83 EXPECT_FALSE(PermissionsData::CanExecuteScriptOnPage(extension, 83 EXPECT_FALSE(PermissionsData::CanExecuteScriptOnPage(extension.get(),
84 kSigninUrl, 84 kSigninUrl,
85 kSigninUrl, 85 kSigninUrl,
86 -1, 86 -1,
87 NULL, 87 NULL,
88 signin_process.GetID(), 88 signin_process.GetID(),
89 &error)) << error; 89 &error)) << error;
90 } 90 }
91 #endif 91 #endif
92 92
93 } // namespace extensions 93 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/blacklist_unittest.cc ('k') | chrome/browser/extensions/bundle_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698