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

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

Issue 309533007: Refactor PermissionsData pt1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 #include "chrome/browser/signin/chrome_signin_client_factory.h" 6 #include "chrome/browser/signin/chrome_signin_client_factory.h"
7 #include "chrome/browser/signin/signin_manager_factory.h" 7 #include "chrome/browser/signin/signin_manager_factory.h"
8 #include "chrome/test/base/testing_browser_process.h" 8 #include "chrome/test/base/testing_browser_process.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "chrome/test/base/testing_profile_manager.h" 10 #include "chrome/test/base/testing_profile_manager.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 SigninClient* signin_client = 67 SigninClient* signin_client =
68 ChromeSigninClientFactory::GetForProfile(profile_); 68 ChromeSigninClientFactory::GetForProfile(profile_);
69 ASSERT_TRUE(signin_client); 69 ASSERT_TRUE(signin_client);
70 signin_client->SetSigninProcess(signin_process.GetID()); 70 signin_client->SetSigninProcess(signin_process.GetID());
71 71
72 scoped_refptr<const Extension> extension(CreateTestExtension("a")); 72 scoped_refptr<const Extension> extension(CreateTestExtension("a"));
73 std::string error; 73 std::string error;
74 74
75 // The same call should succeed with a normal process, but fail with a signin 75 // The same call should succeed with a normal process, but fail with a signin
76 // process. 76 // process.
77 EXPECT_TRUE(PermissionsData::CanExecuteScriptOnPage(extension.get(), 77 EXPECT_TRUE(PermissionsData::ForExtension(extension)
not at google - send to devlin 2014/06/02 23:20:06 here
Devlin 2014/06/03 15:28:21 Done.
78 kSigninUrl, 78 ->CanExecuteScriptOnPage(extension,
79 kSigninUrl, 79 kSigninUrl,
80 -1, 80 kSigninUrl,
81 NULL, 81 -1,
82 normal_process.GetID(), 82 NULL,
83 &error)) << error; 83 normal_process.GetID(),
84 EXPECT_FALSE(PermissionsData::CanExecuteScriptOnPage(extension.get(), 84 &error))
85 kSigninUrl, 85 << error;
86 kSigninUrl, 86 EXPECT_FALSE(PermissionsData::ForExtension(extension)
87 -1, 87 ->CanExecuteScriptOnPage(extension,
88 NULL, 88 kSigninUrl,
89 signin_process.GetID(), 89 kSigninUrl,
90 &error)) << error; 90 -1,
91 NULL,
92 signin_process.GetID(),
93 &error))
94 << error;
91 } 95 }
92 #endif 96 #endif
93 97
94 } // namespace extensions 98 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698