Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ | |
| 6 #define IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "testing/platform_test.h" | |
| 12 | |
| 13 namespace net { | |
| 14 namespace test_server { | |
| 15 class EmbeddedTestServer; | |
| 16 } // namespace test_server | |
| 17 } // namespace net | |
| 18 | |
| 19 @class CWVWebView; | |
| 20 class GURL; | |
| 21 @class NSURL; | |
| 22 | |
| 23 namespace ios_web_view { | |
| 24 | |
| 25 class ChromeWebViewTest : public PlatformTest { | |
| 26 protected: | |
| 27 ChromeWebViewTest(); | |
| 28 ~ChromeWebViewTest() override; | |
| 29 | |
| 30 // Returns URL to an html page with title set to |title|. | |
| 31 GURL GetURLForPageWithTitle(const std::string& title); | |
|
Eugene But (OOO till 7-30)
2017/05/23 19:49:33
Consider s/URL/Url to follow C++ Style Guide.
michaeldo
2017/05/24 15:02:35
Done.
| |
| 32 | |
| 33 // Returns URL to an html page with |html| within page's body tags. | |
| 34 GURL GetURLForPageWithHTMLBody(const std::string& html); | |
| 35 | |
| 36 // Loads |URL| in |web_view| and waits until the load completes. Asserts if | |
| 37 // loading does not complete. | |
| 38 void LoadURL(CWVWebView* web_view, NSURL* URL); | |
| 39 | |
| 40 // Waits until |web_view| stops loading. Asserts if loading does not complete. | |
| 41 void WaitForPageLoadCompletion(CWVWebView* web_view); | |
| 42 | |
| 43 // PlatformTest methods. | |
| 44 void SetUp() override; | |
| 45 void TearDown() override; | |
| 46 | |
| 47 // Embedded server for handling responses to urls as registered by | |
| 48 // net/test/embedded_test_server/default_handlers.h and the GetURLForPageWith* | |
| 49 // methods. | |
| 50 std::unique_ptr<net::test_server::EmbeddedTestServer> test_server_; | |
| 51 }; | |
| 52 | |
| 53 } // namespace ios_web_view | |
| 54 | |
| 55 #endif // IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_ | |
| OLD | NEW |