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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/test_runner.h" 5 #include "components/test_runner/test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2646 } else if (key == "WebKitWebSecurityEnabled") { 2646 } else if (key == "WebKitWebSecurityEnabled") {
2647 prefs->web_security_enabled = value->BooleanValue(); 2647 prefs->web_security_enabled = value->BooleanValue();
2648 } else { 2648 } else {
2649 std::string message("Invalid name for preference: "); 2649 std::string message("Invalid name for preference: ");
2650 message.append(key); 2650 message.append(key);
2651 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n"); 2651 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n");
2652 } 2652 }
2653 delegate_->ApplyPreferences(); 2653 delegate_->ApplyPreferences();
2654 } 2654 }
2655 2655
2656 std::string TestRunner::GetAcceptLanguages() const {
2657 return layout_test_runtime_flags_.accept_languages();
2658 }
2659
2656 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) { 2660 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) {
2657 proxy_->SetAcceptLanguages(accept_languages); 2661 if (accept_languages == GetAcceptLanguages())
2662 return;
Łukasz Anforowicz 2016/03/25 14:37:59 Turns out that we really need to copy this check f
2663
2664 layout_test_runtime_flags_.set_accept_languages(accept_languages);
2665 OnLayoutTestRuntimeFlagsChanged();
2666 proxy_->GetWebView()->acceptLanguagesChanged();
2658 } 2667 }
2659 2668
2660 void TestRunner::SetPluginsEnabled(bool enabled) { 2669 void TestRunner::SetPluginsEnabled(bool enabled) {
2661 delegate_->Preferences()->plugins_enabled = enabled; 2670 delegate_->Preferences()->plugins_enabled = enabled;
2662 delegate_->ApplyPreferences(); 2671 delegate_->ApplyPreferences();
2663 } 2672 }
2664 2673
2665 bool TestRunner::AnimationScheduled() { 2674 bool TestRunner::AnimationScheduled() {
2666 return proxy_->AnimationScheduled(); 2675 return proxy_->AnimationScheduled();
2667 } 2676 }
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 } 3248 }
3240 3249
3241 void TestRunner::DidLosePointerLockInternal() { 3250 void TestRunner::DidLosePointerLockInternal() {
3242 bool was_locked = pointer_locked_; 3251 bool was_locked = pointer_locked_;
3243 pointer_locked_ = false; 3252 pointer_locked_ = false;
3244 if (was_locked) 3253 if (was_locked)
3245 web_view_->didLosePointerLock(); 3254 web_view_->didLosePointerLock();
3246 } 3255 }
3247 3256
3248 } // namespace test_runner 3257 } // namespace test_runner
OLDNEW
« 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