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

Unified Diff: components/test_runner/test_runner.cc

Issue 1829253002: 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: Quit early if the value doesn't really change. 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/test_runner.h ('k') | components/test_runner/tracked_dictionary.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 60fa315e8bb048352a952547f747d8d17e468600..ad6cd5caa6d66e47fa20360312186c4827dae658 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -2653,8 +2653,17 @@ void TestRunner::OverridePreference(const std::string& key,
delegate_->ApplyPreferences();
}
+std::string TestRunner::GetAcceptLanguages() const {
+ return layout_test_runtime_flags_.accept_languages();
+}
+
void TestRunner::SetAcceptLanguages(const std::string& accept_languages) {
- proxy_->SetAcceptLanguages(accept_languages);
+ if (accept_languages == GetAcceptLanguages())
+ return;
Łukasz Anforowicz 2016/03/25 14:37:59 Turns out that we really need to copy this check f
+
+ layout_test_runtime_flags_.set_accept_languages(accept_languages);
+ OnLayoutTestRuntimeFlagsChanged();
+ proxy_->GetWebView()->acceptLanguagesChanged();
}
void TestRunner::SetPluginsEnabled(bool enabled) {
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/tracked_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698