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

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

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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/permissions/permissions_data.h" 8 #include "chrome/common/extensions/permissions/permissions_data.h"
9 #include "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 19 matching lines...) Expand all
30 // Need to delete profile here before the UI thread is destroyed. 30 // Need to delete profile here before the UI thread is destroyed.
31 profile_manager_->DeleteTestingProfile("test"); 31 profile_manager_->DeleteTestingProfile("test");
32 profile_manager_.reset(); 32 profile_manager_.reset();
33 } 33 }
34 protected: 34 protected:
35 content::TestBrowserThreadBundle thread_bundle_; 35 content::TestBrowserThreadBundle thread_bundle_;
36 scoped_ptr<TestingProfileManager> profile_manager_; 36 scoped_ptr<TestingProfileManager> profile_manager_;
37 TestingProfile* profile_; 37 TestingProfile* profile_;
38 }; 38 };
39 39
40 #if !defined(OS_CHROMEOS)
40 scoped_refptr<const Extension> CreateTestExtension(const std::string& id) { 41 scoped_refptr<const Extension> CreateTestExtension(const std::string& id) {
41 return ExtensionBuilder() 42 return ExtensionBuilder()
42 .SetManifest(DictionaryBuilder() 43 .SetManifest(DictionaryBuilder()
43 .Set("name", "Extension with ID " + id) 44 .Set("name", "Extension with ID " + id)
44 .Set("version", "1.0") 45 .Set("version", "1.0")
45 .Set("manifest_version", 2) 46 .Set("manifest_version", 2)
46 .Set("permissions", ListBuilder().Append("<all_urls>"))) 47 .Set("permissions", ListBuilder().Append("<all_urls>")))
47 .SetID(id) 48 .SetID(id)
48 .Build(); 49 .Build();
49 } 50 }
51 #endif
50 52
51 } // namespace 53 } // namespace
52 54
53 #if !defined(OS_CHROMEOS) 55 #if !defined(OS_CHROMEOS)
54 // Tests that CanExecuteScriptOnPage returns false for the signin process, 56 // Tests that CanExecuteScriptOnPage returns false for the signin process,
55 // all else being equal. 57 // all else being equal.
56 TEST_F(BrowserPermissionsPolicyDelegateTest, CanExecuteScriptOnPage) { 58 TEST_F(BrowserPermissionsPolicyDelegateTest, CanExecuteScriptOnPage) {
57 GURL kSigninUrl( 59 GURL kSigninUrl(
58 "https://accounts.google.com/ServiceLogin?service=chromiumsync"); 60 "https://accounts.google.com/ServiceLogin?service=chromiumsync");
59 ASSERT_TRUE(SigninManager::IsWebBasedSigninFlowURL(kSigninUrl)); 61 ASSERT_TRUE(SigninManager::IsWebBasedSigninFlowURL(kSigninUrl));
(...skipping 20 matching lines...) Expand all
80 kSigninUrl, 82 kSigninUrl,
81 kSigninUrl, 83 kSigninUrl,
82 -1, 84 -1,
83 NULL, 85 NULL,
84 signin_process.GetID(), 86 signin_process.GetID(),
85 &error)) << error; 87 &error)) << error;
86 } 88 }
87 #endif 89 #endif
88 90
89 } // namespace extensions 91 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698