OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/layout_test/layout_test_render_frame_observer.h
" | 5 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "components/test_runner/web_test_interfaces.h" | 9 #include "components/test_runner/web_test_interfaces.h" |
10 #include "components/test_runner/web_test_runner.h" | 10 #include "components/test_runner/web_test_runner.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 IPC_MESSAGE_HANDLER(ShellViewMsg_SetTestConfiguration, | 37 IPC_MESSAGE_HANDLER(ShellViewMsg_SetTestConfiguration, |
38 OnSetTestConfiguration) | 38 OnSetTestConfiguration) |
39 IPC_MESSAGE_HANDLER(ShellViewMsg_SetupSecondaryRenderer, | 39 IPC_MESSAGE_HANDLER(ShellViewMsg_SetupSecondaryRenderer, |
40 OnSetupSecondaryRenderer) | 40 OnSetupSecondaryRenderer) |
41 IPC_MESSAGE_UNHANDLED(handled = false) | 41 IPC_MESSAGE_UNHANDLED(handled = false) |
42 IPC_END_MESSAGE_MAP() | 42 IPC_END_MESSAGE_MAP() |
43 | 43 |
44 return handled; | 44 return handled; |
45 } | 45 } |
46 | 46 |
| 47 void LayoutTestRenderFrameObserver::OnDestruct() { |
| 48 delete this; |
| 49 } |
| 50 |
47 void LayoutTestRenderFrameObserver::OnLayoutDumpRequest() { | 51 void LayoutTestRenderFrameObserver::OnLayoutDumpRequest() { |
48 std::string dump = | 52 std::string dump = |
49 LayoutTestRenderThreadObserver::GetInstance() | 53 LayoutTestRenderThreadObserver::GetInstance() |
50 ->test_interfaces() | 54 ->test_interfaces() |
51 ->TestRunner() | 55 ->TestRunner() |
52 ->DumpLayout(render_frame()->GetWebFrame()); | 56 ->DumpLayout(render_frame()->GetWebFrame()); |
53 Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); | 57 Send(new ShellViewHostMsg_LayoutDumpResponse(routing_id(), dump)); |
54 } | 58 } |
55 | 59 |
56 void LayoutTestRenderFrameObserver::OnReplicateTestConfiguration( | 60 void LayoutTestRenderFrameObserver::OnReplicateTestConfiguration( |
57 const ShellTestConfiguration& test_config) { | 61 const ShellTestConfiguration& test_config) { |
58 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 62 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
59 ->OnReplicateTestConfiguration(test_config); | 63 ->OnReplicateTestConfiguration(test_config); |
60 } | 64 } |
61 | 65 |
62 void LayoutTestRenderFrameObserver::OnSetTestConfiguration( | 66 void LayoutTestRenderFrameObserver::OnSetTestConfiguration( |
63 const ShellTestConfiguration& test_config) { | 67 const ShellTestConfiguration& test_config) { |
64 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 68 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
65 ->OnSetTestConfiguration(test_config); | 69 ->OnSetTestConfiguration(test_config); |
66 } | 70 } |
67 | 71 |
68 void LayoutTestRenderFrameObserver::OnSetupSecondaryRenderer() { | 72 void LayoutTestRenderFrameObserver::OnSetupSecondaryRenderer() { |
69 BlinkTestRunner::Get(render_frame()->GetRenderView()) | 73 BlinkTestRunner::Get(render_frame()->GetRenderView()) |
70 ->OnSetupSecondaryRenderer(); | 74 ->OnSetupSecondaryRenderer(); |
71 } | 75 } |
72 | 76 |
73 } // namespace content | 77 } // namespace content |
OLD | NEW |