Commit 27123485 authored by eugenebut's avatar eugenebut Committed by Commit Bot

Removed Chrome prefix from ios_web_view_inttests test fixtures.

Chrome prefix is used for ChromeWebView framework name, but not in any
other class names, hence removed.

BUG=None

Review-Url: https://codereview.chromium.org/2943063002
Cr-Commit-Position: refs/heads/master@{#480289}
parent 72482e62
......@@ -16,10 +16,10 @@ group("all_tests") {
test("ios_web_view_inttests") {
testonly = true
sources = [
"chrome_web_view_kvo_inttest.mm",
"chrome_web_view_restorable_state_inttest.mm",
"chrome_web_view_test.h",
"chrome_web_view_test.mm",
"web_view_kvo_inttest.mm",
"web_view_restorable_state_inttest.mm",
"web_view_test.h",
"web_view_test.mm",
]
deps = [
......
......@@ -8,8 +8,8 @@
#include "base/strings/stringprintf.h"
#import "base/strings/sys_string_conversions.h"
#import "ios/testing/wait_util.h"
#import "ios/web_view/test/chrome_web_view_test.h"
#import "ios/web_view/test/observer.h"
#import "ios/web_view/test/web_view_test.h"
#import "ios/web_view/test/web_view_test_util.h"
#import "net/base/mac/url_conversions.h"
#include "testing/gtest_mac.h"
......@@ -23,10 +23,10 @@ namespace ios_web_view {
// Tests that the KVO compliant properties of CWVWebView correctly report
// changes.
typedef ios_web_view::ChromeWebViewTest ChromeWebViewKvoTest;
typedef ios_web_view::WebViewTest WebViewKvoTest;
// Tests that CWVWebView correctly reports |canGoBack| and |canGoForward| state.
TEST_F(ChromeWebViewKvoTest, CanGoBackForward) {
TEST_F(WebViewKvoTest, CanGoBackForward) {
Observer* back_observer = [[Observer alloc] init];
[back_observer setObservedObject:web_view_ keyPath:@"canGoBack"];
......@@ -84,7 +84,7 @@ TEST_F(ChromeWebViewKvoTest, CanGoBackForward) {
}
// Tests that CWVWebView correctly reports current |title|.
TEST_F(ChromeWebViewKvoTest, Title) {
TEST_F(WebViewKvoTest, Title) {
Observer* observer = [[Observer alloc] init];
[observer setObservedObject:web_view_ keyPath:@"title"];
......@@ -113,7 +113,7 @@ TEST_F(ChromeWebViewKvoTest, Title) {
}
// Tests that CWVWebView correctly reports |isLoading| value.
TEST_F(ChromeWebViewKvoTest, Loading) {
TEST_F(WebViewKvoTest, Loading) {
Observer* observer = [[Observer alloc] init];
[observer setObservedObject:web_view_ keyPath:@"loading"];
......@@ -141,7 +141,7 @@ TEST_F(ChromeWebViewKvoTest, Loading) {
}
// Tests that CWVWebView correctly reports |visibleURL| and |lastCommittedURL|.
TEST_F(ChromeWebViewKvoTest, URLs) {
TEST_F(WebViewKvoTest, URLs) {
Observer* last_committed_url_observer = [[Observer alloc] init];
[last_committed_url_observer setObservedObject:web_view_
keyPath:@"lastCommittedURL"];
......
......@@ -4,7 +4,7 @@
#import <ChromeWebView/ChromeWebView.h>
#import "ios/web_view/test/chrome_web_view_test.h"
#import "ios/web_view/test/web_view_test.h"
#import "ios/web_view/test/web_view_test_util.h"
#include "testing/gtest_mac.h"
......@@ -34,8 +34,8 @@ CWVWebView* CreateWebViewWithState(CWVWebView* source_web_view) {
// Tests encodeRestorableStateWithCoder: and decodeRestorableStateWithCoder:
// methods.
typedef ios_web_view::ChromeWebViewTest ChromeWebViewRestorableStateTest;
TEST_F(ChromeWebViewRestorableStateTest, EncodeDecode) {
typedef ios_web_view::WebViewTest WebViewRestorableStateTest;
TEST_F(WebViewRestorableStateTest, EncodeDecode) {
// Load 2 URLs to create non-default state.
ASSERT_FALSE([web_view_ lastCommittedURL]);
ASSERT_FALSE([web_view_ visibleURL]);
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
#define IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
#ifndef IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_H_
#define IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_H_
#include <memory>
#include <string>
......@@ -26,10 +26,10 @@ namespace ios_web_view {
// A test fixture for testing CWVWebView. A test server is also created to
// support loading content. The server supports the urls returned by the GetUrl*
// methods below.
class ChromeWebViewTest : public PlatformTest {
class WebViewTest : public PlatformTest {
protected:
ChromeWebViewTest();
~ChromeWebViewTest() override;
WebViewTest();
~WebViewTest() override;
// Returns URL to an html page with title set to |title|.
GURL GetUrlForPageWithTitle(const std::string& title);
......@@ -56,4 +56,4 @@ class ChromeWebViewTest : public PlatformTest {
} // namespace ios_web_view
#endif // IOS_WEB_VIEW_TEST_CHROME_WEB_VIEW_TEST_H_
#endif // IOS_WEB_VIEW_TEST_WEB_VIEW_TEST_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/web_view/test/chrome_web_view_test.h"
#import "ios/web_view/test/web_view_test.h"
#import <ChromeWebView/ChromeWebView.h>
#import <Foundation/Foundation.h>
......@@ -96,30 +96,30 @@ std::unique_ptr<net::test_server::HttpResponse> TestRequestHandler(
namespace ios_web_view {
ChromeWebViewTest::ChromeWebViewTest()
WebViewTest::WebViewTest()
: web_view_(test::CreateWebView()),
test_server_(base::MakeUnique<net::EmbeddedTestServer>(
net::test_server::EmbeddedTestServer::TYPE_HTTP)) {
test_server_->RegisterRequestHandler(base::Bind(&TestRequestHandler));
}
ChromeWebViewTest::~ChromeWebViewTest() = default;
WebViewTest::~WebViewTest() = default;
void ChromeWebViewTest::SetUp() {
void WebViewTest::SetUp() {
PlatformTest::SetUp();
ASSERT_TRUE(test_server_->Start());
}
GURL ChromeWebViewTest::GetUrlForPageWithTitle(const std::string& title) {
GURL WebViewTest::GetUrlForPageWithTitle(const std::string& title) {
return GetUrlForPageWithTitleAndBody(title, std::string());
}
GURL ChromeWebViewTest::GetUrlForPageWithHtmlBody(const std::string& html) {
GURL WebViewTest::GetUrlForPageWithHtmlBody(const std::string& html) {
return GetUrlForPageWithTitleAndBody(std::string(), html);
}
GURL ChromeWebViewTest::GetUrlForPageWithTitleAndBody(const std::string& title,
const std::string& body) {
GURL WebViewTest::GetUrlForPageWithTitleAndBody(const std::string& title,
const std::string& body) {
GURL url = test_server_->GetURL(kPageHtmlPath);
// Encode |title| and |body| in url query in order to build the server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment