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

Side by Side Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 601513002: Add test runner support for overriding web_security_enabled preference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « content/shell/common/webkit_test_helpers.cc ('k') | no next file » | 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 "content/shell/renderer/test_runner/test_runner.h" 5 #include "content/shell/renderer/test_runner/test_runner.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/shell/common/test_runner/test_preferences.h" 10 #include "content/shell/common/test_runner/test_preferences.h"
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 } else if (key == "WebKitEnableCaretBrowsing") { 2489 } else if (key == "WebKitEnableCaretBrowsing") {
2490 prefs->caret_browsing_enabled = value->BooleanValue(); 2490 prefs->caret_browsing_enabled = value->BooleanValue();
2491 } else if (key == "WebKitAllowDisplayingInsecureContent") { 2491 } else if (key == "WebKitAllowDisplayingInsecureContent") {
2492 prefs->allow_display_of_insecure_content = value->BooleanValue(); 2492 prefs->allow_display_of_insecure_content = value->BooleanValue();
2493 } else if (key == "WebKitAllowRunningInsecureContent") { 2493 } else if (key == "WebKitAllowRunningInsecureContent") {
2494 prefs->allow_running_of_insecure_content = value->BooleanValue(); 2494 prefs->allow_running_of_insecure_content = value->BooleanValue();
2495 } else if (key == "WebKitShouldRespectImageOrientation") { 2495 } else if (key == "WebKitShouldRespectImageOrientation") {
2496 prefs->should_respect_image_orientation = value->BooleanValue(); 2496 prefs->should_respect_image_orientation = value->BooleanValue();
2497 } else if (key == "WebKitWebAudioEnabled") { 2497 } else if (key == "WebKitWebAudioEnabled") {
2498 DCHECK(value->BooleanValue()); 2498 DCHECK(value->BooleanValue());
2499 } else if (key == "WebKitWebSecurityEnabled") {
2500 prefs->web_security_enabled = value->BooleanValue();
2499 } else { 2501 } else {
2500 std::string message("Invalid name for preference: "); 2502 std::string message("Invalid name for preference: ");
2501 message.append(key); 2503 message.append(key);
2502 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n"); 2504 delegate_->PrintMessage(std::string("CONSOLE MESSAGE: ") + message + "\n");
2503 } 2505 }
2504 delegate_->ApplyPreferences(); 2506 delegate_->ApplyPreferences();
2505 } 2507 }
2506 2508
2507 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) { 2509 void TestRunner::SetAcceptLanguages(const std::string& accept_languages) {
2508 proxy_->SetAcceptLanguages(accept_languages); 2510 proxy_->SetAcceptLanguages(accept_languages);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 } 2924 }
2923 2925
2924 void TestRunner::DidLosePointerLockInternal() { 2926 void TestRunner::DidLosePointerLockInternal() {
2925 bool was_locked = pointer_locked_; 2927 bool was_locked = pointer_locked_;
2926 pointer_locked_ = false; 2928 pointer_locked_ = false;
2927 if (was_locked) 2929 if (was_locked)
2928 web_view_->didLosePointerLock(); 2930 web_view_->didLosePointerLock();
2929 } 2931 }
2930 2932
2931 } // namespace content 2933 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/common/webkit_test_helpers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698