Commit 26caeee7 authored by edchin's avatar edchin Committed by Chromium LUCI CQ

[ios][PhishGuard] Clean up password_protection_service_unittest

Removes unnecessary subclass in test file.

Bug: 1147967
Change-Id: I72d5d219dd5488a1b42a1512a7de0e34d153cc18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2572041Reviewed-by: default avatarBettina Dea <bdea@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833499}
parent 175afb23
...@@ -230,21 +230,6 @@ class TestPasswordProtectionService : public MockPasswordProtectionService { ...@@ -230,21 +230,6 @@ class TestPasswordProtectionService : public MockPasswordProtectionService {
DISALLOW_COPY_AND_ASSIGN(TestPasswordProtectionService); DISALLOW_COPY_AND_ASSIGN(TestPasswordProtectionService);
}; };
class MockPasswordProtectionNavigationThrottle
: public PasswordProtectionNavigationThrottle {
public:
MockPasswordProtectionNavigationThrottle(
content::NavigationHandle* navigation_handle,
scoped_refptr<PasswordProtectionRequest> request,
bool is_warning_showing)
: PasswordProtectionNavigationThrottle(navigation_handle,
request,
is_warning_showing) {}
private:
DISALLOW_COPY_AND_ASSIGN(MockPasswordProtectionNavigationThrottle);
};
class PasswordProtectionServiceTest : public ::testing::TestWithParam<bool> { class PasswordProtectionServiceTest : public ::testing::TestWithParam<bool> {
public: public:
PasswordProtectionServiceTest() PasswordProtectionServiceTest()
...@@ -1456,7 +1441,7 @@ TEST_P(PasswordProtectionServiceTest, TestRequestCancelOnTimeout) { ...@@ -1456,7 +1441,7 @@ TEST_P(PasswordProtectionServiceTest, TestRequestCancelOnTimeout) {
InitializeAndStartPasswordOnFocusRequest(true /* match whitelist */, InitializeAndStartPasswordOnFocusRequest(true /* match whitelist */,
10000 /* timeout in ms */, 10000 /* timeout in ms */,
web_contents.get()); web_contents.get());
auto throttle = std::make_unique<MockPasswordProtectionNavigationThrottle>( auto throttle = std::make_unique<PasswordProtectionNavigationThrottle>(
nullptr, request_, false); nullptr, request_, false);
EXPECT_EQ(1U, GetNumberOfNavigationThrottles()); EXPECT_EQ(1U, GetNumberOfNavigationThrottles());
request_->Cancel(true /* timeout */); request_->Cancel(true /* timeout */);
...@@ -1468,7 +1453,7 @@ TEST_P(PasswordProtectionServiceTest, TestRequestCancelNotOnTimeout) { ...@@ -1468,7 +1453,7 @@ TEST_P(PasswordProtectionServiceTest, TestRequestCancelNotOnTimeout) {
InitializeAndStartPasswordOnFocusRequest(true /* match whitelist */, InitializeAndStartPasswordOnFocusRequest(true /* match whitelist */,
10000 /* timeout in ms */, 10000 /* timeout in ms */,
web_contents.get()); web_contents.get());
auto throttle = std::make_unique<MockPasswordProtectionNavigationThrottle>( auto throttle = std::make_unique<PasswordProtectionNavigationThrottle>(
nullptr, request_, false); nullptr, request_, false);
EXPECT_EQ(1U, GetNumberOfNavigationThrottles()); EXPECT_EQ(1U, GetNumberOfNavigationThrottles());
request_->Cancel(false /* timeout */); request_->Cancel(false /* timeout */);
......
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