diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-30 22:27:04 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-30 22:27:04 +0000 |
commit | 74830f079e4a4417c3a8c87cfd993b1cfaefadf8 (patch) | |
tree | ced0f3613c7e2449f8a32deaa6db3d763f69eb24 /content/shell/shell_render_process_observer.cc | |
parent | 130f02d464be38e03c259fc9f06be9c78596f9c5 (diff) | |
download | chromium_src-74830f079e4a4417c3a8c87cfd993b1cfaefadf8.zip chromium_src-74830f079e4a4417c3a8c87cfd993b1cfaefadf8.tar.gz chromium_src-74830f079e4a4417c3a8c87cfd993b1cfaefadf8.tar.bz2 |
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
Diffstat (limited to 'content/shell/shell_render_process_observer.cc')
-rw-r--r-- | content/shell/shell_render_process_observer.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/content/shell/shell_render_process_observer.cc b/content/shell/shell_render_process_observer.cc new file mode 100644 index 0000000..a46f6f9 --- /dev/null +++ b/content/shell/shell_render_process_observer.cc @@ -0,0 +1,26 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/shell/shell_render_process_observer.h" + +#include "base/command_line.h" +#include "content/public/renderer/render_thread.h" +#include "content/shell/layout_test_controller_bindings.h" +#include "content/shell/shell_switches.h" + +namespace content { + +ShellRenderProcessObserver::ShellRenderProcessObserver() { + RenderThread::Get()->AddObserver(this); +} + +ShellRenderProcessObserver::~ShellRenderProcessObserver() { +} + +void ShellRenderProcessObserver::WebKitInitialized() { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) + RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings()); +} + +} // namespace content |