| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file contains the definition for LayoutTestController. | 5 // This file contains the definition for LayoutTestController. |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "webkit/tools/test_shell/layout_test_controller.h" | 9 #include "webkit/tools/test_shell/layout_test_controller.h" |
| 10 | 10 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 else if (key == "WebKitJavaEnabled") | 915 else if (key == "WebKitJavaEnabled") |
| 916 preferences->java_enabled = CppVariantToBool(value); | 916 preferences->java_enabled = CppVariantToBool(value); |
| 917 else if (key == "WebKitUsesPageCachePreferenceKey") | 917 else if (key == "WebKitUsesPageCachePreferenceKey") |
| 918 preferences->uses_page_cache = CppVariantToBool(value); | 918 preferences->uses_page_cache = CppVariantToBool(value); |
| 919 else if (key == "WebKitXSSAuditorEnabled") | 919 else if (key == "WebKitXSSAuditorEnabled") |
| 920 preferences->xss_auditor_enabled = CppVariantToBool(value); | 920 preferences->xss_auditor_enabled = CppVariantToBool(value); |
| 921 else if (key == "WebKitLocalStorageEnabledPreferenceKey") | 921 else if (key == "WebKitLocalStorageEnabledPreferenceKey") |
| 922 preferences->local_storage_enabled = CppVariantToBool(value); | 922 preferences->local_storage_enabled = CppVariantToBool(value); |
| 923 else if (key == "WebKitOfflineWebApplicationCacheEnabled") | 923 else if (key == "WebKitOfflineWebApplicationCacheEnabled") |
| 924 preferences->application_cache_enabled = CppVariantToBool(value); | 924 preferences->application_cache_enabled = CppVariantToBool(value); |
| 925 else if (key == "WebKitTabToLinksPreferenceKey") |
| 926 preferences->tabs_to_links = CppVariantToBool(value); |
| 925 else { | 927 else { |
| 926 std::string message("Invalid name for preference: "); | 928 std::string message("Invalid name for preference: "); |
| 927 message.append(key); | 929 message.append(key); |
| 928 LogErrorToConsole(message); | 930 LogErrorToConsole(message); |
| 929 } | 931 } |
| 930 preferences->Apply(shell_->webView()); | 932 preferences->Apply(shell_->webView()); |
| 931 } | 933 } |
| 932 result->SetNull(); | 934 result->SetNull(); |
| 933 } | 935 } |
| 934 | 936 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 961 WebString::fromUTF8(args[2].ToString()), | 963 WebString::fromUTF8(args[2].ToString()), |
| 962 args[3].ToBoolean()); | 964 args[3].ToBoolean()); |
| 963 } | 965 } |
| 964 | 966 |
| 965 void LayoutTestController::LogErrorToConsole(const std::string& text) { | 967 void LayoutTestController::LogErrorToConsole(const std::string& text) { |
| 966 shell_->delegate()->didAddMessageToConsole( | 968 shell_->delegate()->didAddMessageToConsole( |
| 967 WebConsoleMessage(WebConsoleMessage::LevelError, | 969 WebConsoleMessage(WebConsoleMessage::LevelError, |
| 968 WebString::fromUTF8(text)), | 970 WebString::fromUTF8(text)), |
| 969 WebString(), 0); | 971 WebString(), 0); |
| 970 } | 972 } |
| OLD | NEW |