OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/shell_render_process_observer.h" | 5 #include "content/shell/shell_render_process_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/renderer/render_view.h" | 8 #include "content/public/renderer/render_view.h" |
9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
10 #include "content/shell/shell_messages.h" | 10 #include "content/shell/shell_messages.h" |
11 #include "content/shell/shell_switches.h" | 11 #include "content/shell/shell_switches.h" |
| 12 #include "content/shell/webkit_test_runner.h" |
12 #include "content/shell/webkit_test_runner_bindings.h" | 13 #include "content/shell/webkit_test_runner_bindings.h" |
13 #include "webkit/glue/webkit_glue.h" | 14 #include "webkit/glue/webkit_glue.h" |
14 #include "webkit/support/gc_extension.h" | 15 #include "webkit/support/gc_extension.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTestingSupport.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTestingSupport.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
17 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestInterfaces.h" | 18 #include "third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/public/Web
TestInterfaces.h" |
18 | 19 |
19 using WebKit::WebFrame; | 20 using WebKit::WebFrame; |
20 using WebKit::WebTestingSupport; | 21 using WebKit::WebTestingSupport; |
21 using WebTestRunner::WebTestDelegate; | 22 using WebTestRunner::WebTestDelegate; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) | 83 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) |
83 IPC_MESSAGE_UNHANDLED(handled = false) | 84 IPC_MESSAGE_UNHANDLED(handled = false) |
84 IPC_END_MESSAGE_MAP() | 85 IPC_END_MESSAGE_MAP() |
85 | 86 |
86 return handled; | 87 return handled; |
87 } | 88 } |
88 | 89 |
89 void ShellRenderProcessObserver::OnResetAll() { | 90 void ShellRenderProcessObserver::OnResetAll() { |
90 test_interfaces_->resetAll(); | 91 test_interfaces_->resetAll(); |
91 if (main_render_view_) { | 92 if (main_render_view_) { |
| 93 WebKitTestRunner::Get(main_render_view_)->Reset(); |
92 WebTestingSupport::resetInternalsObject( | 94 WebTestingSupport::resetInternalsObject( |
93 main_render_view_->GetWebView()->mainFrame()); | 95 main_render_view_->GetWebView()->mainFrame()); |
94 } | 96 } |
95 } | 97 } |
96 | 98 |
97 void ShellRenderProcessObserver::OnSetWebKitSourceDir( | 99 void ShellRenderProcessObserver::OnSetWebKitSourceDir( |
98 const FilePath& webkit_source_dir) { | 100 const FilePath& webkit_source_dir) { |
99 webkit_source_dir_ = webkit_source_dir; | 101 webkit_source_dir_ = webkit_source_dir; |
100 } | 102 } |
101 | 103 |
102 } // namespace content | 104 } // namespace content |
OLD | NEW |