Commit 80af4179 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Rename some classes for "web test"

- content::LayoutTestBluetoothFakeAdapterSetterImpl
- content::LayoutTestBrowserMainParts
- content::MojoLayoutTestHelper

Their file names were already renamed in crrev.com/613027.

This CL has no behavior changes.

Bug: 84341
Change-Id: I97c32f04a8b2d3ba06947176e912a222885b9cdd
Reviewed-on: https://chromium-review.googlesource.com/c/1358313Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613348}
parent 9760426c
...@@ -8,17 +8,17 @@ ...@@ -8,17 +8,17 @@
namespace content { namespace content {
MojoLayoutTestHelper::MojoLayoutTestHelper() {} MojoWebTestHelper::MojoWebTestHelper() {}
MojoLayoutTestHelper::~MojoLayoutTestHelper() {} MojoWebTestHelper::~MojoWebTestHelper() {}
// static // static
void MojoLayoutTestHelper::Create(mojom::MojoLayoutTestHelperRequest request) { void MojoWebTestHelper::Create(mojom::MojoLayoutTestHelperRequest request) {
mojo::MakeStrongBinding(std::make_unique<MojoLayoutTestHelper>(), mojo::MakeStrongBinding(std::make_unique<MojoWebTestHelper>(),
std::move(request)); std::move(request));
} }
void MojoLayoutTestHelper::Reverse(const std::string& message, void MojoWebTestHelper::Reverse(const std::string& message,
ReverseCallback callback) { ReverseCallback callback) {
std::move(callback).Run(std::string(message.rbegin(), message.rend())); std::move(callback).Run(std::string(message.rbegin(), message.rend()));
} }
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
namespace content { namespace content {
class MojoLayoutTestHelper : public mojom::MojoLayoutTestHelper { class MojoWebTestHelper : public mojom::MojoLayoutTestHelper {
public: public:
MojoLayoutTestHelper(); MojoWebTestHelper();
~MojoLayoutTestHelper() override; ~MojoWebTestHelper() override;
static void Create(mojom::MojoLayoutTestHelperRequest request); static void Create(mojom::MojoLayoutTestHelperRequest request);
...@@ -21,7 +21,7 @@ class MojoLayoutTestHelper : public mojom::MojoLayoutTestHelper { ...@@ -21,7 +21,7 @@ class MojoLayoutTestHelper : public mojom::MojoLayoutTestHelper {
void Reverse(const std::string& message, ReverseCallback callback) override; void Reverse(const std::string& message, ReverseCallback callback) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(MojoLayoutTestHelper); DISALLOW_COPY_AND_ASSIGN(MojoWebTestHelper);
}; };
} // namespace content } // namespace content
......
...@@ -14,22 +14,21 @@ ...@@ -14,22 +14,21 @@
namespace content { namespace content {
LayoutTestBluetoothFakeAdapterSetterImpl:: WebTestBluetoothFakeAdapterSetterImpl::WebTestBluetoothFakeAdapterSetterImpl() {
LayoutTestBluetoothFakeAdapterSetterImpl() {} }
LayoutTestBluetoothFakeAdapterSetterImpl:: WebTestBluetoothFakeAdapterSetterImpl::
~LayoutTestBluetoothFakeAdapterSetterImpl() {} ~WebTestBluetoothFakeAdapterSetterImpl() {}
// static // static
void LayoutTestBluetoothFakeAdapterSetterImpl::Create( void WebTestBluetoothFakeAdapterSetterImpl::Create(
mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) { mojom::LayoutTestBluetoothFakeAdapterSetterRequest request) {
mojo::MakeStrongBinding( mojo::MakeStrongBinding(
std::make_unique<LayoutTestBluetoothFakeAdapterSetterImpl>(), std::make_unique<WebTestBluetoothFakeAdapterSetterImpl>(),
std::move(request)); std::move(request));
} }
void LayoutTestBluetoothFakeAdapterSetterImpl::Set( void WebTestBluetoothFakeAdapterSetterImpl::Set(const std::string& adapter_name,
const std::string& adapter_name,
SetCallback callback) { SetCallback callback) {
SetTestBluetoothScanDuration( SetTestBluetoothScanDuration(
BluetoothTestScanDurationSetting::kImmediateTimeout); BluetoothTestScanDurationSetting::kImmediateTimeout);
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
namespace content { namespace content {
class LayoutTestBluetoothFakeAdapterSetterImpl class WebTestBluetoothFakeAdapterSetterImpl
: public mojom::LayoutTestBluetoothFakeAdapterSetter { : public mojom::LayoutTestBluetoothFakeAdapterSetter {
public: public:
LayoutTestBluetoothFakeAdapterSetterImpl(); WebTestBluetoothFakeAdapterSetterImpl();
~LayoutTestBluetoothFakeAdapterSetterImpl() override; ~WebTestBluetoothFakeAdapterSetterImpl() override;
static void Create( static void Create(
mojom::LayoutTestBluetoothFakeAdapterSetterRequest request); mojom::LayoutTestBluetoothFakeAdapterSetterRequest request);
...@@ -22,7 +22,7 @@ class LayoutTestBluetoothFakeAdapterSetterImpl ...@@ -22,7 +22,7 @@ class LayoutTestBluetoothFakeAdapterSetterImpl
private: private:
void Set(const std::string& adapter_name, SetCallback callback) override; void Set(const std::string& adapter_name, SetCallback callback) override;
DISALLOW_COPY_AND_ASSIGN(LayoutTestBluetoothFakeAdapterSetterImpl); DISALLOW_COPY_AND_ASSIGN(WebTestBluetoothFakeAdapterSetterImpl);
}; };
} // namespace content } // namespace content
......
...@@ -48,18 +48,18 @@ ...@@ -48,18 +48,18 @@
namespace content { namespace content {
LayoutTestBrowserMainParts::LayoutTestBrowserMainParts( WebTestBrowserMainParts::WebTestBrowserMainParts(
const MainFunctionParams& parameters) const MainFunctionParams& parameters)
: ShellBrowserMainParts(parameters) {} : ShellBrowserMainParts(parameters) {}
LayoutTestBrowserMainParts::~LayoutTestBrowserMainParts() {} WebTestBrowserMainParts::~WebTestBrowserMainParts() {}
void LayoutTestBrowserMainParts::InitializeBrowserContexts() { void WebTestBrowserMainParts::InitializeBrowserContexts() {
set_browser_context(new WebTestBrowserContext(false, net_log())); set_browser_context(new WebTestBrowserContext(false, net_log()));
set_off_the_record_browser_context(nullptr); set_off_the_record_browser_context(nullptr);
} }
void LayoutTestBrowserMainParts::InitializeMessageLoopContext() { void WebTestBrowserMainParts::InitializeMessageLoopContext() {
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
PluginService* plugin_service = PluginService::GetInstance(); PluginService* plugin_service = PluginService::GetInstance();
plugin_service_filter_.reset(new ShellPluginServiceFilter); plugin_service_filter_.reset(new ShellPluginServiceFilter);
......
...@@ -16,10 +16,10 @@ namespace content { ...@@ -16,10 +16,10 @@ namespace content {
class ShellPluginServiceFilter; class ShellPluginServiceFilter;
class LayoutTestBrowserMainParts : public ShellBrowserMainParts { class WebTestBrowserMainParts : public ShellBrowserMainParts {
public: public:
explicit LayoutTestBrowserMainParts(const MainFunctionParams& parameters); explicit WebTestBrowserMainParts(const MainFunctionParams& parameters);
~LayoutTestBrowserMainParts() override; ~WebTestBrowserMainParts() override;
private: private:
void InitializeBrowserContexts() override; void InitializeBrowserContexts() override;
...@@ -29,7 +29,7 @@ class LayoutTestBrowserMainParts : public ShellBrowserMainParts { ...@@ -29,7 +29,7 @@ class LayoutTestBrowserMainParts : public ShellBrowserMainParts {
std::unique_ptr<ShellPluginServiceFilter> plugin_service_filter_; std::unique_ptr<ShellPluginServiceFilter> plugin_service_filter_;
#endif #endif
DISALLOW_COPY_AND_ASSIGN(LayoutTestBrowserMainParts); DISALLOW_COPY_AND_ASSIGN(WebTestBrowserMainParts);
}; };
} // namespace content } // namespace content
......
...@@ -49,7 +49,7 @@ WebTestContentBrowserClient* g_layout_test_browser_client; ...@@ -49,7 +49,7 @@ WebTestContentBrowserClient* g_layout_test_browser_client;
void BindWebTestHelper(mojom::MojoLayoutTestHelperRequest request, void BindWebTestHelper(mojom::MojoLayoutTestHelperRequest request,
RenderFrameHost* render_frame_host) { RenderFrameHost* render_frame_host) {
MojoLayoutTestHelper::Create(std::move(request)); MojoWebTestHelper::Create(std::move(request));
} }
class TestOverlayWindow : public OverlayWindow { class TestOverlayWindow : public OverlayWindow {
...@@ -140,7 +140,7 @@ void WebTestContentBrowserClient::ExposeInterfacesToRenderer( ...@@ -140,7 +140,7 @@ void WebTestContentBrowserClient::ExposeInterfacesToRenderer(
base::CreateSingleThreadTaskRunnerWithTraits( base::CreateSingleThreadTaskRunnerWithTraits(
{content::BrowserThread::UI}); {content::BrowserThread::UI});
registry->AddInterface( registry->AddInterface(
base::BindRepeating(&LayoutTestBluetoothFakeAdapterSetterImpl::Create), base::BindRepeating(&WebTestBluetoothFakeAdapterSetterImpl::Create),
ui_task_runner); ui_task_runner);
registry->AddInterface(base::BindRepeating(&bluetooth::FakeBluetooth::Create), registry->AddInterface(base::BindRepeating(&bluetooth::FakeBluetooth::Create),
...@@ -154,7 +154,7 @@ void WebTestContentBrowserClient::ExposeInterfacesToRenderer( ...@@ -154,7 +154,7 @@ void WebTestContentBrowserClient::ExposeInterfacesToRenderer(
&WebTestContentBrowserClient::CreateFakeBluetoothChooser, &WebTestContentBrowserClient::CreateFakeBluetoothChooser,
base::Unretained(this)), base::Unretained(this)),
ui_task_runner); ui_task_runner);
registry->AddInterface(base::BindRepeating(&MojoLayoutTestHelper::Create)); registry->AddInterface(base::BindRepeating(&MojoWebTestHelper::Create));
registry->AddInterface( registry->AddInterface(
base::BindRepeating(&WebTestContentBrowserClient::BindClipboardHost, base::BindRepeating(&WebTestContentBrowserClient::BindClipboardHost,
base::Unretained(this)), base::Unretained(this)),
...@@ -208,7 +208,7 @@ void WebTestContentBrowserClient::AppendExtraCommandLineSwitches( ...@@ -208,7 +208,7 @@ void WebTestContentBrowserClient::AppendExtraCommandLineSwitches(
BrowserMainParts* WebTestContentBrowserClient::CreateBrowserMainParts( BrowserMainParts* WebTestContentBrowserClient::CreateBrowserMainParts(
const MainFunctionParams& parameters) { const MainFunctionParams& parameters) {
set_browser_main_parts(new LayoutTestBrowserMainParts(parameters)); set_browser_main_parts(new WebTestBrowserMainParts(parameters));
return shell_browser_main_parts(); return shell_browser_main_parts();
} }
......
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