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 // Multiply-included file, no traditional include guard. | 5 // Multiply-included file, no traditional include guard. |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
| 9 #include "components/test_runner/layout_dump_flags.h" |
9 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
10 #include "content/public/common/page_state.h" | 11 #include "content/public/common/page_state.h" |
11 #include "content/shell/common/leak_detection_result.h" | 12 #include "content/shell/common/leak_detection_result.h" |
12 #include "content/shell/common/shell_test_configuration.h" | 13 #include "content/shell/common/shell_test_configuration.h" |
13 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
14 #include "ipc/ipc_platform_file.h" | 15 #include "ipc/ipc_platform_file.h" |
15 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
16 #include "ui/gfx/ipc/gfx_param_traits.h" | 17 #include "ui/gfx/ipc/gfx_param_traits.h" |
17 | 18 |
18 #define IPC_MESSAGE_START ShellMsgStart | 19 #define IPC_MESSAGE_START ShellMsgStart |
19 | 20 |
20 IPC_STRUCT_TRAITS_BEGIN(content::ShellTestConfiguration) | 21 IPC_STRUCT_TRAITS_BEGIN(content::ShellTestConfiguration) |
21 IPC_STRUCT_TRAITS_MEMBER(current_working_directory) | 22 IPC_STRUCT_TRAITS_MEMBER(current_working_directory) |
22 IPC_STRUCT_TRAITS_MEMBER(temp_path) | 23 IPC_STRUCT_TRAITS_MEMBER(temp_path) |
23 IPC_STRUCT_TRAITS_MEMBER(test_url) | 24 IPC_STRUCT_TRAITS_MEMBER(test_url) |
24 IPC_STRUCT_TRAITS_MEMBER(enable_pixel_dumping) | 25 IPC_STRUCT_TRAITS_MEMBER(enable_pixel_dumping) |
25 IPC_STRUCT_TRAITS_MEMBER(allow_external_pages) | 26 IPC_STRUCT_TRAITS_MEMBER(allow_external_pages) |
26 IPC_STRUCT_TRAITS_MEMBER(expected_pixel_hash) | 27 IPC_STRUCT_TRAITS_MEMBER(expected_pixel_hash) |
27 IPC_STRUCT_TRAITS_MEMBER(initial_size) | 28 IPC_STRUCT_TRAITS_MEMBER(initial_size) |
28 IPC_STRUCT_TRAITS_END() | 29 IPC_STRUCT_TRAITS_END() |
29 | 30 |
| 31 IPC_ENUM_TRAITS_MIN_MAX_VALUE( |
| 32 test_runner::LayoutDumpMode, |
| 33 test_runner::LayoutDumpMode::DUMP_AS_TEXT, |
| 34 test_runner::LayoutDumpMode::DUMP_SCROLL_POSITIONS) |
| 35 |
| 36 IPC_STRUCT_TRAITS_BEGIN(test_runner::LayoutDumpFlags) |
| 37 IPC_STRUCT_TRAITS_MEMBER(main_dump_mode) |
| 38 IPC_STRUCT_TRAITS_MEMBER(dump_as_printed) |
| 39 IPC_STRUCT_TRAITS_MEMBER(dump_child_frames) |
| 40 IPC_STRUCT_TRAITS_MEMBER(dump_line_box_trees) |
| 41 IPC_STRUCT_TRAITS_MEMBER(debug_render_tree) |
| 42 IPC_STRUCT_TRAITS_END() |
| 43 |
30 // Tells the renderer to reset all test runners. | 44 // Tells the renderer to reset all test runners. |
31 IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset) | 45 IPC_MESSAGE_ROUTED0(ShellViewMsg_Reset) |
32 | 46 |
33 // Sets the path to the WebKit checkout. | 47 // Sets the path to the WebKit checkout. |
34 IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir, | 48 IPC_MESSAGE_CONTROL1(ShellViewMsg_SetWebKitSourceDir, |
35 base::FilePath /* webkit source dir */) | 49 base::FilePath /* webkit source dir */) |
36 | 50 |
37 // Sets the initial configuration to use for layout tests. | 51 // Sets the initial configuration to use for layout tests. |
38 IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration, | 52 IPC_MESSAGE_ROUTED1(ShellViewMsg_SetTestConfiguration, |
39 content::ShellTestConfiguration) | 53 content::ShellTestConfiguration) |
40 | 54 |
41 // Tells the main window that a secondary window in a different process invoked | 55 // Tells the main window that a secondary window in a different process invoked |
42 // notifyDone(). | 56 // notifyDone(). |
43 IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone) | 57 IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone) |
44 | 58 |
45 // Pushes a snapshot of the current session history from the browser process. | 59 // Pushes a snapshot of the current session history from the browser process. |
46 // This includes only information about those RenderViews that are in the | 60 // This includes only information about those RenderViews that are in the |
47 // same process as the main window of the layout test and that are the current | 61 // same process as the main window of the layout test and that are the current |
48 // active RenderView of their WebContents. | 62 // active RenderView of their WebContents. |
49 IPC_MESSAGE_ROUTED3( | 63 IPC_MESSAGE_ROUTED3( |
50 ShellViewMsg_SessionHistory, | 64 ShellViewMsg_SessionHistory, |
51 std::vector<int> /* routing_ids */, | 65 std::vector<int> /* routing_ids */, |
52 std::vector<std::vector<content::PageState> > /* session_histories */, | 66 std::vector<std::vector<content::PageState> > /* session_histories */, |
53 std::vector<unsigned> /* current_entry_indexes */) | 67 std::vector<unsigned> /* current_entry_indexes */) |
54 | 68 |
55 IPC_MESSAGE_ROUTED0(ShellViewMsg_TryLeakDetection) | 69 IPC_MESSAGE_ROUTED0(ShellViewMsg_TryLeakDetection) |
56 | 70 |
| 71 // Asks a frame to dump its contents into a string and send them back over IPC. |
| 72 IPC_MESSAGE_ROUTED1(ShellViewMsg_LayoutDumpRequest, |
| 73 test_runner::LayoutDumpFlags) |
| 74 |
| 75 // Notifies BlinkTestRunner that the layout dump has completed |
| 76 // (and that it can proceed with finishing up the test). |
| 77 IPC_MESSAGE_ROUTED1(ShellViewMsg_LayoutDumpCompleted, |
| 78 std::string /* completed/stitched layout dump */) |
| 79 |
57 // Send a text dump of the WebContents to the render host. | 80 // Send a text dump of the WebContents to the render host. |
58 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump, | 81 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_TextDump, |
59 std::string /* dump */) | 82 std::string /* dump */) |
60 | 83 |
| 84 // Asks the browser process to perform a layout dump (potentially spanning |
| 85 // multiple cross-process frames) using the given flags. This triggers |
| 86 // multiple ShellViewMsg_LayoutDumpRequest / ShellViewHostMsg_LayoutDumpResponse |
| 87 // messages and ends with sending of ShellViewMsg_LayoutDumpCompleted. |
| 88 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_InitiateLayoutDump, |
| 89 test_runner::LayoutDumpFlags) |
| 90 |
| 91 // Sends a layout dump of a frame (response to ShellViewMsg_LayoutDumpRequest). |
| 92 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_LayoutDumpResponse, std::string /* dump */) |
| 93 |
61 // Send an image dump of the WebContents to the render host. | 94 // Send an image dump of the WebContents to the render host. |
62 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump, | 95 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_ImageDump, |
63 std::string /* actual pixel hash */, | 96 std::string /* actual pixel hash */, |
64 SkBitmap /* image */) | 97 SkBitmap /* image */) |
65 | 98 |
66 // Send an audio dump to the render host. | 99 // Send an audio dump to the render host. |
67 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump, | 100 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_AudioDump, |
68 std::vector<unsigned char> /* audio data */) | 101 std::vector<unsigned char> /* audio data */) |
69 | 102 |
70 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished) | 103 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_TestFinished) |
(...skipping 30 matching lines...) Expand all Loading... |
101 content::LeakDetectionResult /* result */) | 134 content::LeakDetectionResult /* result */) |
102 | 135 |
103 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetBluetoothManualChooser, | 136 IPC_MESSAGE_ROUTED1(ShellViewHostMsg_SetBluetoothManualChooser, |
104 bool /* enable */) | 137 bool /* enable */) |
105 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_GetBluetoothManualChooserEvents) | 138 IPC_MESSAGE_ROUTED0(ShellViewHostMsg_GetBluetoothManualChooserEvents) |
106 IPC_MESSAGE_ROUTED1(ShellViewMsg_ReplyBluetoothManualChooserEvents, | 139 IPC_MESSAGE_ROUTED1(ShellViewMsg_ReplyBluetoothManualChooserEvents, |
107 std::vector<std::string> /* events */) | 140 std::vector<std::string> /* events */) |
108 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_SendBluetoothManualChooserEvent, | 141 IPC_MESSAGE_ROUTED2(ShellViewHostMsg_SendBluetoothManualChooserEvent, |
109 std::string /* event */, | 142 std::string /* event */, |
110 std::string /* argument */) | 143 std::string /* argument */) |
OLD | NEW |