Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: components/test_runner/test_runner.cc

Issue 1456753002: Compute the popup location/size correctly when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update TestExpectations Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 2ffbee56bf67b22984b3ecb21694717e2ecca392..79224b133b7981acdf98fc3d09e43bddf7d80473 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -272,6 +272,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetWindowIsKey(bool value);
std::string PathToLocalResource(const std::string& path);
void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback);
+ void EnableUseZoomForDSF(v8::Local<v8::Function> callback);
void SetColorProfile(const std::string& name,
v8::Local<v8::Function> callback);
void SetPOSIXLocale(const std::string& locale);
@@ -545,6 +546,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::PathToLocalResource)
.SetMethod("setBackingScaleFactor",
&TestRunnerBindings::SetBackingScaleFactor)
+ .SetMethod("enableUseZoomForDSF",
+ &TestRunnerBindings::EnableUseZoomForDSF)
.SetMethod("setColorProfile", &TestRunnerBindings::SetColorProfile)
.SetMethod("setPOSIXLocale", &TestRunnerBindings::SetPOSIXLocale)
.SetMethod("setMIDIAccessorResult",
@@ -1347,6 +1350,12 @@ void TestRunnerBindings::SetBackingScaleFactor(
runner_->SetBackingScaleFactor(value, callback);
}
+void TestRunnerBindings::EnableUseZoomForDSF(
+ v8::Local<v8::Function> callback) {
+ if (runner_)
+ runner_->EnableUseZoomForDSF(callback);
+}
+
void TestRunnerBindings::SetColorProfile(
const std::string& name, v8::Local<v8::Function> callback) {
if (runner_)
@@ -2859,6 +2868,11 @@ void TestRunner::SetBackingScaleFactor(double value,
delegate_->PostTask(new InvokeCallbackTask(this, callback));
}
+void TestRunner::EnableUseZoomForDSF(v8::Local<v8::Function> callback) {
+ delegate_->EnableUseZoomForDSF();
+ delegate_->PostTask(new InvokeCallbackTask(this, callback));
+}
+
void TestRunner::SetColorProfile(const std::string& name,
v8::Local<v8::Function> callback) {
delegate_->SetDeviceColorProfile(name);
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698