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

Side by Side Diff: chrome/browser/extensions/api/identity/identity_apitest.cc

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 (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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/api/identity/identity_api.h" 10 #include "chrome/browser/extensions/api/identity/identity_api.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 break; 181 break;
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 private: 186 private:
187 ResultType result_; 187 ResultType result_;
188 OAuth2MintTokenFlow::Delegate* delegate_; 188 OAuth2MintTokenFlow::Delegate* delegate_;
189 }; 189 };
190 190
191 BrowserContextKeyedService* IdentityAPITestFactory(
192 content::BrowserContext* profile) {
193 return new IdentityAPI(static_cast<Profile*>(profile));
194 }
195
196 // Waits for a specific GURL to generate a NOTIFICATION_LOAD_STOP event and 191 // Waits for a specific GURL to generate a NOTIFICATION_LOAD_STOP event and
197 // saves a pointer to the window embedding the WebContents, which can be later 192 // saves a pointer to the window embedding the WebContents, which can be later
198 // closed. 193 // closed.
199 class WaitForGURLAndCloseWindow : public content::WindowedNotificationObserver { 194 class WaitForGURLAndCloseWindow : public content::WindowedNotificationObserver {
200 public: 195 public:
201 explicit WaitForGURLAndCloseWindow(GURL url) 196 explicit WaitForGURLAndCloseWindow(GURL url)
202 : WindowedNotificationObserver( 197 : WindowedNotificationObserver(
203 content::NOTIFICATION_LOAD_STOP, 198 content::NOTIFICATION_LOAD_STOP,
204 content::NotificationService::AllSources()), 199 content::NotificationService::AllSources()),
205 url_(url) {} 200 url_(url) {}
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 scoped_ptr<base::Value> value( 1228 scoped_ptr<base::Value> value(
1234 utils::RunFunctionAndReturnSingleResult(function.get(), args, browser())); 1229 utils::RunFunctionAndReturnSingleResult(function.get(), args, browser()));
1235 1230
1236 std::string url; 1231 std::string url;
1237 EXPECT_TRUE(value->GetAsString(&url)); 1232 EXPECT_TRUE(value->GetAsString(&url));
1238 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"), 1233 EXPECT_EQ(std::string("https://abcdefghij.chromiumapp.org/callback#test"),
1239 url); 1234 url);
1240 } 1235 }
1241 1236
1242 } // namespace extensions 1237 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698