First version of the layoutTestController for content_shell

This version supports dumpAsText, dumpChildFramesAsText, waitUntilDone, and
notifyDone

BUG=111316
TEST=run content_shell --dump-render-tree <some layout test that only uses above functions>


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119750 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index 01296bb..98301f17 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -4,11 +4,13 @@
 
 #include "content/shell/shell_content_browser_client.h"
 
+#include "base/command_line.h"
 #include "base/file_path.h"
 #include "content/shell/shell.h"
 #include "content/shell/shell_browser_main.h"
 #include "content/shell/shell_devtools_delegate.h"
 #include "content/shell/shell_render_view_host_observer.h"
+#include "content/shell/shell_switches.h"
 #include "googleurl/src/gurl.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "webkit/glue/webpreferences.h"
@@ -109,6 +111,8 @@
 
 void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
     CommandLine* command_line, int child_process_id) {
+  if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
+    command_line->AppendSwitch(switches::kDumpRenderTree);
 }
 
 std::string ShellContentBrowserClient::GetApplicationLocale() {