Commit deb49246 authored by danakj's avatar danakj Committed by Commit Bot

Remove enableUseZoomForDSF from testRunner bindings.

The enableUseZoomForDSF method is not used in tests. The check for it
being enabled does not need to go through WebTestDelegate anymore.

R=avi@chromium.org

Bug: 866140
Change-Id: I19d23b5e0835d2f2428fa88ae5c35bc0fa035b7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148816Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758980}
parent 49687e0b
......@@ -278,15 +278,6 @@ void BlinkTestRunner::SetDeviceScaleFactor(float factor) {
content::SetDeviceScaleFactor(render_view(), factor);
}
void BlinkTestRunner::EnableUseZoomForDSF() {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableUseZoomForDSF);
}
bool BlinkTestRunner::IsUseZoomForDSFEnabled() {
return content::IsUseZoomForDSFEnabled();
}
void BlinkTestRunner::SetDeviceColorSpace(const std::string& name) {
content::SetDeviceColorSpace(render_view(), GetWebTestColorSpace(name));
}
......
......@@ -84,8 +84,6 @@ class BlinkTestRunner : public RenderViewObserver,
void SimulateWebContentIndexDelete(const std::string& id) override;
void SetDeviceScaleFactor(float factor) override;
void SetDeviceColorSpace(const std::string& name) override;
void EnableUseZoomForDSF() override;
bool IsUseZoomForDSFEnabled() override;
void SetBluetoothFakeAdapter(const std::string& adapter_name,
base::OnceClosure callback) override;
void SetBluetoothManualChooser(bool enable) override;
......
......@@ -181,7 +181,6 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void DumpSpellCheckCallbacks();
void DumpTitleChanges();
void DumpUserGestureInFrameLoadCallbacks();
void EnableUseZoomForDSF(v8::Local<v8::Function> callback);
void EvaluateScriptInIsolatedWorld(int world_id, const std::string& script);
void ExecCommand(gin::Arguments* args);
void TriggerTestInspectorIssue(gin::Arguments* args);
......@@ -454,8 +453,6 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::DumpUserGestureInFrameLoadCallbacks)
.SetMethod("enableAutoResizeMode",
&TestRunnerBindings::EnableAutoResizeMode)
.SetMethod("enableUseZoomForDSF",
&TestRunnerBindings::EnableUseZoomForDSF)
.SetMethod("evaluateScriptInIsolatedWorld",
&TestRunnerBindings::EvaluateScriptInIsolatedWorld)
.SetMethod(
......@@ -1215,11 +1212,6 @@ void TestRunnerBindings::SetBackingScaleFactor(
view_runner_->SetBackingScaleFactor(limited_value, callback);
}
void TestRunnerBindings::EnableUseZoomForDSF(v8::Local<v8::Function> callback) {
if (view_runner_)
view_runner_->EnableUseZoomForDSF(callback);
}
void TestRunnerBindings::SetColorProfile(const std::string& name,
v8::Local<v8::Function> callback) {
if (view_runner_)
......
......@@ -18,6 +18,7 @@
#include "cc/paint/paint_canvas.h"
#include "content/common/widget_messages.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/common/use_zoom_for_dsf_policy.h"
#include "content/shell/common/web_test/web_test_string_util.h"
#include "content/shell/test_runner/layout_dump.h"
#include "content/shell/test_runner/mock_content_settings_client.h"
......@@ -399,16 +400,10 @@ void TestRunnerForSpecificView::SetBackingScaleFactor(
v8::UniquePersistent<v8::Function> global_callback(blink::MainThreadIsolate(),
callback);
v8::Local<v8::Value> arg = v8::Boolean::New(
blink::MainThreadIsolate(), delegate()->IsUseZoomForDSFEnabled());
blink::MainThreadIsolate(), content::IsUseZoomForDSFEnabled());
PostV8CallbackWithArgs(std::move(global_callback), 1, &arg);
}
void TestRunnerForSpecificView::EnableUseZoomForDSF(
v8::Local<v8::Function> callback) {
delegate()->EnableUseZoomForDSF();
PostV8Callback(callback);
}
void TestRunnerForSpecificView::SetColorProfile(
const std::string& name,
v8::Local<v8::Function> callback) {
......
......@@ -131,10 +131,6 @@ class TestRunnerForSpecificView {
// Used to set the device scale factor.
void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback);
// Enable zoom-for-dsf option.
// TODO(oshima): Remove this once all platforms migrated.
void EnableUseZoomForDSF(v8::Local<v8::Function> callback);
// Change the device color profile while running a web test.
void SetColorProfile(const std::string& name,
v8::Local<v8::Function> callback);
......
......@@ -103,12 +103,6 @@ class WebTestDelegate {
// Controls the device scale factor of the main WebView for hidpi tests.
virtual void SetDeviceScaleFactor(float factor) = 0;
// Enable zoom-for-dsf option.
virtual void EnableUseZoomForDSF() = 0;
// Returns whether or not the use-zoom-for-dsf flag is enabled.
virtual bool IsUseZoomForDSFEnabled() = 0;
// Change the device color space while running a web test.
virtual void SetDeviceColorSpace(const std::string& name) = 0;
......
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