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

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 171097: The 2 layout test regressions happened due to changes in the test shell.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/layout_test_controller.cc
===================================================================
--- webkit/tools/test_shell/layout_test_controller.cc (revision 23607)
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
@@ -16,7 +16,6 @@
#include "base/string_util.h"
#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebScriptSource.h"
-#include "webkit/api/public/WebSettings.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview.h"
@@ -557,8 +556,9 @@
const CppArgumentList& args, CppVariant* result) {
if (args.size() > 0 && args[0].isBool()) {
bool block_popups = args[0].ToBoolean();
- shell_->webView()->GetSettings()->setJavaScriptCanOpenWindowsAutomatically(
- !block_popups);
+ WebPreferences* prefs = shell_->GetWebPreferences();
+ prefs->javascript_can_open_windows_automatically = !block_popups;
+ prefs->Apply(shell_->webView());
}
result->SetNull();
}
@@ -705,7 +705,9 @@
void LayoutTestController::disableImageLoading(const CppArgumentList& args,
CppVariant* result) {
- shell_->webView()->GetSettings()->setLoadsImagesAutomatically(false);
+ WebPreferences* prefs = shell_->GetWebPreferences();
darin (slow to review) 2009/08/18 18:02:47 nit: 2 space indent
+ prefs->loads_images_automatically = false;
+ prefs->Apply(shell_->webView());
result->SetNull();
}
@@ -789,8 +791,9 @@
void LayoutTestController::setXSSAuditorEnabled(
const CppArgumentList& args, CppVariant* result) {
if (args.size() > 0 && args[0].isBool()) {
- bool enabled = args[0].value.boolValue;
- shell_->webView()->GetSettings()->setXSSAuditorEnabled(enabled);
+ WebPreferences* prefs = shell_->GetWebPreferences();
+ prefs->xss_auditor_enabled = args[0].value.boolValue;
+ prefs->Apply(shell_->webView());
}
result->SetNull();
}
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698