Update test_shell LayoutTestController to support recently added boolean params
to addUserScript and addUserStyleSheet (mirrors changes made to Chromium DRT
made with http://trac.webkit.org/changeset/62876 and
http://trac.webkit.org/changeset/68114).

TEST=layout tests in userscripts/
BUG=56220

Review URL: http://codereview.chromium.org/3413036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60526 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 6281202f..9878bf6 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -1421,18 +1421,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,