Commit dc883177 authored by Lucas Furukawa Gadani's avatar Lucas Furukawa Gadani Committed by Commit Bot

Remove const interfaces from content/public/test.

Bug: 908139
Change-Id: I5ade2d364906e02be87c819d7a97a13f767f1ddc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676236Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672217}
parent d42db43d
......@@ -117,7 +117,7 @@ class CorsFileOriginBrowserTest
}
private:
bool AllowFileAccessFromFiles() const override { return false; }
bool AllowFileAccessFromFiles() override { return false; }
virtual bool IsWebSecurityEnabled() const { return true; }
void SetUpCommandLine(base::CommandLine* command_line) override {
......@@ -200,7 +200,7 @@ class CorsFileOriginBrowserTest
class CorsFileOriginBrowserTestWithAllowFileAccessFromFiles
: public CorsFileOriginBrowserTest {
private:
bool AllowFileAccessFromFiles() const override { return true; }
bool AllowFileAccessFromFiles() override { return true; }
};
// Tests end to end Origin header and CORS check behaviors with
......@@ -208,7 +208,7 @@ class CorsFileOriginBrowserTestWithAllowFileAccessFromFiles
class CorsFileOriginBrowserTestWithDisableWebSecurity
: public CorsFileOriginBrowserTest {
private:
bool AllowFileAccessFromFiles() const override { return false; }
bool AllowFileAccessFromFiles() override { return false; }
bool IsWebSecurityEnabled() const override { return false; }
};
......
......@@ -483,7 +483,7 @@ void BrowserTestBase::TearDown() {
#endif
}
bool BrowserTestBase::AllowFileAccessFromFiles() const {
bool BrowserTestBase::AllowFileAccessFromFiles() {
return true;
}
......
......@@ -52,7 +52,7 @@ class BrowserTestBase : public testing::Test {
virtual void SetUpCommandLine(base::CommandLine* command_line) {}
// Override this to disallow accesses to be production-compatible.
virtual bool AllowFileAccessFromFiles() const;
virtual bool AllowFileAccessFromFiles();
// Crash the Network Service process. Should only be called when
// out-of-process Network Service is enabled. Re-applies any added host
......
......@@ -302,13 +302,13 @@ class NavigationSimulator {
// Returns the NavigationHandle associated with the navigation being
// simulated. It is an error to call this before Start() or after the
// navigation has finished (successfully or not).
virtual NavigationHandle* GetNavigationHandle() const = 0;
virtual NavigationHandle* GetNavigationHandle() = 0;
// Returns the GlobalRequestID for the simulated navigation request. Can be
// invoked after the navigation has completed. It is an error to call this
// before the simulated navigation has completed its WillProcessResponse
// callback.
virtual GlobalRequestID GetGlobalRequestID() const = 0;
virtual GlobalRequestID GetGlobalRequestID() = 0;
private:
// This interface should only be implemented inside content.
......
......@@ -36,11 +36,11 @@ class TestWebUIDataSourceImpl : public TestWebUIDataSource {
~TestWebUIDataSourceImpl() override {}
const base::DictionaryValue* GetLocalizedStrings() const override {
const base::DictionaryValue* GetLocalizedStrings() override {
return source_->GetLocalizedStrings();
}
const ui::TemplateReplacements* GetReplacements() const override {
const ui::TemplateReplacements* GetReplacements() override {
return source_->GetReplacements();
}
......
......@@ -26,9 +26,9 @@ class TestWebUIDataSource {
virtual ~TestWebUIDataSource() = default;
virtual const base::DictionaryValue* GetLocalizedStrings() const = 0;
virtual const base::DictionaryValue* GetLocalizedStrings() = 0;
virtual const ui::TemplateReplacements* GetReplacements() const = 0;
virtual const ui::TemplateReplacements* GetReplacements() = 0;
virtual WebUIDataSource* GetWebUIDataSource() = 0;
};
......
......@@ -122,10 +122,10 @@ class WebContentsTester {
// Returns headers that were passed in the previous SaveFrameWithHeaders(...)
// call.
virtual const std::string& GetSaveFrameHeaders() const = 0;
virtual const std::string& GetSaveFrameHeaders() = 0;
// Returns the suggested file name passed in the SaveFrameWithHeaders call.
virtual const base::string16& GetSuggestedFileName() const = 0;
virtual const base::string16& GetSuggestedFileName() = 0;
// Returns whether a download request triggered via DownloadImage() is in
// progress for |url|.
......
......@@ -914,12 +914,12 @@ NavigationSimulatorImpl::GetLastThrottleCheckResult() {
return last_throttle_check_result_.value();
}
NavigationHandleImpl* NavigationSimulatorImpl::GetNavigationHandle() const {
NavigationHandleImpl* NavigationSimulatorImpl::GetNavigationHandle() {
CHECK_GE(state_, STARTED);
return request_->navigation_handle();
}
content::GlobalRequestID NavigationSimulatorImpl::GetGlobalRequestID() const {
content::GlobalRequestID NavigationSimulatorImpl::GetGlobalRequestID() {
CHECK_GT(state_, STARTED) << "The GlobalRequestID is not available until "
"after the navigation has completed "
"WillProcessResponse";
......
......@@ -97,8 +97,8 @@ class NavigationSimulatorImpl : public NavigationSimulator,
void SetSSLInfo(const net::SSLInfo& ssl_info) override;
NavigationThrottle::ThrottleCheckResult GetLastThrottleCheckResult() override;
NavigationHandleImpl* GetNavigationHandle() const override;
content::GlobalRequestID GetGlobalRequestID() const override;
NavigationHandleImpl* GetNavigationHandle() override;
content::GlobalRequestID GetGlobalRequestID() override;
// Additional utilites usable only inside content/.
......
......@@ -190,11 +190,11 @@ void TestWebContents::TestDidNavigateWithSequenceNumber(
rfh->SendNavigateWithParams(&params, was_within_same_document);
}
const std::string& TestWebContents::GetSaveFrameHeaders() const {
const std::string& TestWebContents::GetSaveFrameHeaders() {
return save_frame_headers_;
}
const base::string16& TestWebContents::GetSuggestedFileName() const {
const base::string16& TestWebContents::GetSuggestedFileName() {
return suggested_filename_;
}
......
......@@ -95,8 +95,8 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester {
NavigationHandle* navigation_handle,
scoped_refptr<net::HttpResponseHeaders> response_headers) override;
void SetOpener(WebContents* opener) override;
const std::string& GetSaveFrameHeaders() const override;
const base::string16& GetSuggestedFileName() const override;
const std::string& GetSaveFrameHeaders() override;
const base::string16& GetSuggestedFileName() override;
bool HasPendingDownloadImage(const GURL& url) override;
bool TestDidDownloadImage(
const GURL& url,
......
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