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

Side by Side Diff: ios/web_view/test/chrome_web_view_test.h

Issue 2940953003: Consolidated all CWVWebView test helpers inside web_view_test_util file. (Closed)
Patch Set: Addressed review comments Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ 5 #ifndef IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
6 #define IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ 6 #define IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 24 matching lines...) Expand all
35 GURL GetUrlForPageWithTitle(const std::string& title); 35 GURL GetUrlForPageWithTitle(const std::string& title);
36 36
37 // Returns URL to an html page with |html| within page's body tags. 37 // Returns URL to an html page with |html| within page's body tags.
38 GURL GetUrlForPageWithHtmlBody(const std::string& html); 38 GURL GetUrlForPageWithHtmlBody(const std::string& html);
39 39
40 // Returns URL to an html page with title set to |title| and |body| within 40 // Returns URL to an html page with title set to |title| and |body| within
41 // the page's body tags. 41 // the page's body tags.
42 GURL GetUrlForPageWithTitleAndBody(const std::string& title, 42 GURL GetUrlForPageWithTitleAndBody(const std::string& title,
43 const std::string& body); 43 const std::string& body);
44 44
45 // Loads |URL| in |web_view| and waits until the load completes. Asserts if
46 // loading does not complete.
47 void LoadUrl(CWVWebView* web_view, NSURL* url);
48
49 // Waits until |web_view| stops loading. Asserts if loading does not complete.
50 void WaitForPageLoadCompletion(CWVWebView* web_view);
51
52 // PlatformTest methods. 45 // PlatformTest methods.
53 void SetUp() override; 46 void SetUp() override;
54 47
55 // CWVWebView created with default configuration and frame equal to screen 48 // CWVWebView created with default configuration and frame equal to screen
56 // bounds. 49 // bounds.
57 base::scoped_nsobject<CWVWebView> web_view_; 50 base::scoped_nsobject<CWVWebView> web_view_;
58 51
59 // Embedded server for handling requests sent to the URLs returned by the 52 // Embedded server for handling requests sent to the URLs returned by the
60 // GetURL* methods. 53 // GetURL* methods.
61 std::unique_ptr<net::test_server::EmbeddedTestServer> test_server_; 54 std::unique_ptr<net::test_server::EmbeddedTestServer> test_server_;
62 }; 55 };
63 56
64 } // namespace ios_web_view 57 } // namespace ios_web_view
65 58
66 #endif // IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ 59 #endif // IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
OLDNEW
« no previous file with comments | « ios/web_view/test/chrome_web_view_restorable_state_inttest.mm ('k') | ios/web_view/test/chrome_web_view_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698