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

Side by Side Diff: ios/web/shell/test/app/web_shell_test_util.mm

Issue 1950323002: Refactor web shell integration tests utilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alphabetize Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef IOS_WEB_SHELL_TEST_WEB_SHELL_TEST_UTIL_H_ 5 #import "ios/web/shell/test/app/web_shell_test_util.h"
6 #define IOS_WEB_SHELL_TEST_WEB_SHELL_TEST_UTIL_H_ 6
7 #include <UIKit/UIKit.h>
Eugene But (OOO till 7-30) 2016/05/05 18:01:11 s/include/import
baxley 2016/05/05 21:13:53 Done.
7 8
8 #import "ios/web/shell/view_controller.h" 9 #import "ios/web/shell/view_controller.h"
9 10
10 namespace web { 11 namespace web {
11 namespace web_shell_test_util { 12 namespace web_shell_test_util {
12 13
13 // Gets the current ViewController for the web shell. 14 web::WebState* GetCurrentWebState() {
14 ViewController* GetCurrentViewController(); 15 ViewController* view_controller = (ViewController*)[
Eugene But (OOO till 7-30) 2016/05/05 18:01:11 Missed this last time. Use static_cast instead of
baxley 2016/05/05 21:13:53 Done.
16 [[[UIApplication sharedApplication] delegate] window] rootViewController];
17 return view_controller.webState;
18 }
15 19
16 } // namespace web_shell_test_util 20 } // namespace web_shell_test_util
17 } // namespace web 21 } // namespace web
18
19 #endif // IOS_WEB_SHELL_TEST_WEB_SHELL_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698