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

Unified Diff: components/test_runner/web_test_proxy.cc

Issue 1851483002: Revert of Replicate to all renderers the accepted languages set by a layout test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splitting-web-frame-test-client
Patch Set: Created 4 years, 9 months 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/web_test_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_test_proxy.cc
diff --git a/components/test_runner/web_test_proxy.cc b/components/test_runner/web_test_proxy.cc
index 413e484cfbd0b312f84c45c70ba99afb848a8c42..39da57559a1b622b4013c63ce803e2832c587ef6 100644
--- a/components/test_runner/web_test_proxy.cc
+++ b/components/test_runner/web_test_proxy.cc
@@ -154,6 +154,7 @@
void WebTestProxyBase::Reset() {
drag_image_.reset();
animate_scheduled_ = false;
+ accept_languages_ = "";
}
blink::WebSpellCheckClient* WebTestProxyBase::GetSpellCheckClient() const {
@@ -221,6 +222,14 @@
SkIRect rect; // Bounding rect
rect.set(wr.x, wr.y, wr.x + wr.width, wr.y + wr.height);
canvas->drawIRect(rect, paint);
+}
+
+void WebTestProxyBase::SetAcceptLanguages(const std::string& accept_languages) {
+ bool notify = accept_languages_ != accept_languages;
+ accept_languages_ = accept_languages;
+
+ if (notify)
+ GetWebView()->acceptLanguagesChanged();
}
void WebTestProxyBase::CopyImageAtAndCapturePixels(
@@ -525,8 +534,7 @@
}
blink::WebString WebTestProxyBase::acceptLanguages() {
- return blink::WebString::fromUTF8(
- test_interfaces_->GetTestRunner()->GetAcceptLanguages());
+ return blink::WebString::fromUTF8(accept_languages_);
}
} // namespace test_runner
« no previous file with comments | « components/test_runner/web_test_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698