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

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: Rebasing... Created 4 years, 8 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 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 } else if (key == "WebKitWebSecurityEnabled") { 2650 } else if (key == "WebKitWebSecurityEnabled") {
2651 prefs->web_security_enabled = value->BooleanValue(); 2651 prefs->web_security_enabled = value->BooleanValue();
2652 } else { 2652 } else {
2653 std::string message("Invalid name for preference: "); 2653 std::string message("Invalid name for preference: ");
2654 message.append(key); 2654 message.append(key);
2655 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n"); 2655 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n");
2656 } 2656 }
2657 delegate_->ApplyPreferences(); 2657 delegate_->ApplyPreferences();
2658 } 2658 }
2659 2659
2660 std::string TestRunner::GetAcceptLanguages() const {
2661 return layout_test_runtime_flags_.accept_languages();
2662 }
2663
2660 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) { 2664 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) {
2661 proxy_->SetAcceptLanguages(accept_languages); 2665 if (accept_languages == GetAcceptLanguages())
2666 return;
2667
2668 layout_test_runtime_flags_.set_accept_languages(accept_languages);
2669 OnLayoutTestRuntimeFlagsChanged();
2670 proxy_->GetWebView()->acceptLanguagesChanged();
2662 } 2671 }
2663 2672
2664 void TestRunner::SetPluginsEnabled(bool enabled) { 2673 void TestRunner::SetPluginsEnabled(bool enabled) {
2665 delegate_->Preferences()->plugins_enabled = enabled; 2674 delegate_->Preferences()->plugins_enabled = enabled;
2666 delegate_->ApplyPreferences(); 2675 delegate_->ApplyPreferences();
2667 } 2676 }
2668 2677
2669 bool TestRunner::AnimationScheduled() { 2678 bool TestRunner::AnimationScheduled() {
2670 return proxy_->AnimationScheduled(); 2679 return proxy_->AnimationScheduled();
2671 } 2680 }
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3243 } 3252 }
3244 3253
3245 void TestRunner::DidLosePointerLockInternal() { 3254 void TestRunner::DidLosePointerLockInternal() {
3246 bool was_locked = pointer_locked_; 3255 bool was_locked = pointer_locked_;
3247 pointer_locked_ = false; 3256 pointer_locked_ = false;
3248 if (was_locked) 3257 if (was_locked)
3249 web_view_->didLosePointerLock(); 3258 web_view_->didLosePointerLock();
3250 } 3259 }
3251 3260
3252 } // namespace test_runner 3261 } // 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