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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.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
Index: webkit/tools/test_shell/test_webview_delegate.cc
===================================================================
--- webkit/tools/test_shell/test_webview_delegate.cc (revision 23607)
+++ webkit/tools/test_shell/test_webview_delegate.cc (working copy)
@@ -27,7 +27,6 @@
#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebKit.h"
#include "webkit/api/public/WebScreenInfo.h"
-#include "webkit/api/public/WebSettings.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebURLError.h"
@@ -806,16 +805,16 @@
}
void TestWebViewDelegate::SetUserStyleSheetEnabled(bool is_enabled) {
- // Disabling/enabling this is really just setting it to an empty URL or
- // setting it to something else. From this location in the code, there's
- // no way to know what it's supposed to be. Luckily, right now, this is only
- // used to disable the user style sheet.
- DCHECK(!is_enabled);
- shell_->webView()->GetSettings()->setUserStyleSheetLocation(WebURL());
+ WebPreferences* prefs = shell_->GetWebPreferences();
+ prefs->user_style_sheet_enabled = is_enabled;
+ prefs->Apply(shell_->webView());
}
void TestWebViewDelegate::SetUserStyleSheetLocation(const GURL& location) {
- shell_->webView()->GetSettings()->setUserStyleSheetLocation(location);
+ WebPreferences* prefs = shell_->GetWebPreferences();
+ prefs->user_style_sheet_enabled = true;
+ prefs->user_style_sheet_location = location;
+ prefs->Apply(shell_->webView());
}
// WebWidgetDelegate ---------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698