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

Unified Diff: ios/web/public/test/web_test.h

Issue 2060483003: [ios] Extracted web_test.h classes into separate files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/public/test/web_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/web_test.h
diff --git a/ios/web/public/test/web_test.h b/ios/web/public/test/web_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..8e0aa2381e9b84439e3c2210507d3b0c297430ad
--- /dev/null
+++ b/ios/web/public/test/web_test.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_PUBLIC_TEST_WEB_TEST_H_
+#define IOS_WEB_PUBLIC_TEST_WEB_TEST_H_
+
+#include "ios/web/public/test/scoped_testing_web_client.h"
+#include "ios/web/public/test/test_browser_state.h"
+#include "ios/web/public/test/test_web_thread_bundle.h"
+#include "testing/platform_test.h"
+
+namespace web {
+
+class BrowserState;
+class TestWebClient;
+
+// A test fixture for web tests that need a minimum environment set up that
+// mimics a web embedder.
+class WebTest : public PlatformTest {
+ protected:
+ WebTest();
+ ~WebTest() override;
+
+ // PlatformTest methods.
+ void SetUp() override;
+ void TearDown() override;
+
+ // Returns the WebClient that is used for testing.
+ TestWebClient* GetWebClient();
+
+ // Returns the BrowserState that is used for testing.
+ virtual BrowserState* GetBrowserState();
+
+ private:
+ // The WebClient used in tests.
+ ScopedTestingWebClient web_client_;
+ // The threads used for testing.
+ web::TestWebThreadBundle thread_bundle_;
+ // The browser state used in tests.
+ TestBrowserState browser_state_;
+};
+
+} // namespace web
+
+#endif // IOS_WEB_PUBLIC_TEST_WEB_TEST_H_
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/public/test/web_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698