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

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

Issue 3413036: Update test_shell LayoutTestController to support recently added boolean para... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « no previous file | no next file » | 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 60478)
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
@@ -1405,18 +1405,32 @@
void LayoutTestController::addUserScript(const CppArgumentList& args,
CppVariant* result) {
result->SetNull();
- if (args.size() < 2 || !args[0].isString() || !args[1].isBool())
+ if (args.size() < 3 || !args[0].isString() || !args[1].isBool() ||
+ !args[2].isBool())
return;
- shell_->webView()->addUserScript(WebString::fromUTF8(args[0].ToString()),
- args[1].ToBoolean());
+ WebKit::WebView::addUserScript(
+ WebString::fromUTF8(args[0].ToString()),
+ WebKit::WebVector<WebString>(),
+ args[1].ToBoolean() ?
+ WebKit::WebView::UserScriptInjectAtDocumentStart :
+ WebKit::WebView::UserScriptInjectAtDocumentEnd,
+ args[2].ToBoolean() ?
+ WebKit::WebView::UserContentInjectInAllFrames :
+ WebKit::WebView::UserContentInjectInTopFrameOnly);
}
void LayoutTestController::addUserStyleSheet(const CppArgumentList& args,
CppVariant* result) {
result->SetNull();
- if (args.size() < 1 || !args[0].isString())
+ if (args.size() < 2 || !args[0].isString() || !args[1].isBool())
return;
- shell_->webView()->addUserStyleSheet(WebString::fromUTF8(args[0].ToString()));
+ WebKit::WebView::addUserStyleSheet(
+ WebString::fromUTF8(args[0].ToString()),
+ WebKit::WebVector<WebString>(),
+ args[1].ToBoolean() ?
+ WebKit::WebView::UserContentInjectInAllFrames :
+ WebKit::WebView::UserContentInjectInTopFrameOnly,
+ WebKit::WebView::UserStyleInjectInExistingDocuments);
}
void LayoutTestController::setEditingBehavior(const CppArgumentList& args,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698