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

Side by Side Diff: components/test_runner/test_runner.cc

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