diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 04:15:31 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 04:15:31 +0000 |
commit | 5a52f16a208389a6f8d285cd63333f6bfe17997d (patch) | |
tree | d69ae768f9e6d0e1f52021db1760eafa5c17ba1d /chrome/common | |
parent | 6eb0876213f6859369ea1c7247a350b0d70cc15b (diff) | |
download | chromium_src-5a52f16a208389a6f8d285cd63333f6bfe17997d.zip chromium_src-5a52f16a208389a6f8d285cd63333f6bfe17997d.tar.gz chromium_src-5a52f16a208389a6f8d285cd63333f6bfe17997d.tar.bz2 |
Adding a UI test to catch the crash described in issue 1341577.This test is disabled, and will be turned on once we fix the issue.I added to TabProxy the ability to do FindNext, which was necessary to reproduce the crash, and changed the automation IPC to take a FindInPageRequest struct, which makes it identical to the IPC we pass to render_view.BUG=1341577
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1425 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/ipc_message_utils.h | 25 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 49 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 3 |
3 files changed, 38 insertions, 39 deletions
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h index dfc3614..0c6ef8e 100644 --- a/chrome/common/ipc_message_utils.h +++ b/chrome/common/ipc_message_utils.h @@ -15,6 +15,7 @@ #include "chrome/common/thumbnail_score.h" #include "webkit/glue/cache_manager.h" #include "webkit/glue/console_message_level.h" +#include "webkit/glue/find_in_page_request.h" #include "webkit/glue/window_open_disposition.h" // Forward declarations. @@ -1188,6 +1189,30 @@ class MessageWithReply : public SyncMessage { } }; +// Traits for ViewMsg_FindInPageMsg_Request structure to pack/unpack. +template <> +struct ParamTraits<FindInPageRequest> { + typedef FindInPageRequest param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.request_id); + WriteParam(m, p.search_string); + WriteParam(m, p.forward); + WriteParam(m, p.match_case); + WriteParam(m, p.find_next); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return + ReadParam(m, iter, &p->request_id) && + ReadParam(m, iter, &p->search_string) && + ReadParam(m, iter, &p->forward) && + ReadParam(m, iter, &p->match_case) && + ReadParam(m, iter, &p->find_next); + } + static void Log(const param_type& p, std::wstring* l) { + l->append(L"<FindInPageRequest>"); + } +}; + //----------------------------------------------------------------------------- } // namespace IPC diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 98eb857..a47b05b 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_COMMON_RENDER_MESSAGES_H__ -#define CHROME_COMMON_RENDER_MESSAGES_H__ +#ifndef CHROME_COMMON_RENDER_MESSAGES_H_ +#define CHROME_COMMON_RENDER_MESSAGES_H_ #include <string> #include <vector> @@ -284,8 +284,8 @@ struct ViewHostMsg_Resource_Request { }; // Parameters for a resource response header. -struct ViewMsg_Resource_ResponseHead : - webkit_glue::ResourceLoaderBridge::ResponseInfo { +struct ViewMsg_Resource_ResponseHead + : webkit_glue::ResourceLoaderBridge::ResponseInfo { // The response status. URLRequestStatus status; @@ -418,7 +418,7 @@ struct ParamTraits<ResourceType::Type> { } static void Log(const param_type& p, std::wstring* l) { std::wstring type; - switch(p) { + switch (p) { case ResourceType::MAIN_FRAME: type = L"MAIN_FRAME"; break; @@ -455,7 +455,7 @@ struct ParamTraits<FilterPolicy::Type> { } static void Log(const param_type& p, std::wstring* l) { std::wstring type; - switch(p) { + switch (p) { case FilterPolicy::DONT_FILTER: type = L"DONT_FILTER"; break; @@ -489,7 +489,7 @@ struct ParamTraits<ContextNode::Type> { } static void Log(const param_type& p, std::wstring* l) { std::wstring type; - switch(p) { + switch (p) { case WebInputEvent::MOUSE_DOWN: type = L"MOUSE_DOWN"; break; @@ -538,7 +538,7 @@ struct ParamTraits<WebInputEvent::Type> { } static void Log(const param_type& p, std::wstring* l) { std::wstring event; - switch(p) { + switch (p) { case ContextNode::NONE: event = L"NONE"; break; @@ -590,7 +590,7 @@ struct ParamTraits<ViewHostMsg_ImeControl> { } static void Log(const param_type& p, std::wstring* l) { std::wstring control; - switch(p) { + switch (p) { case IME_DISABLE: control = L"IME_DISABLE"; break; @@ -980,30 +980,6 @@ struct ParamTraits<ViewMsg_UploadFile_Params> { } }; -// Traits for ViewMsg_FindInPageMsg_Request structure to pack/unpack. -template <> -struct ParamTraits<FindInPageRequest> { - typedef FindInPageRequest param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.request_id); - WriteParam(m, p.search_string); - WriteParam(m, p.forward); - WriteParam(m, p.match_case); - WriteParam(m, p.find_next); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return - ReadParam(m, iter, &p->request_id) && - ReadParam(m, iter, &p->search_string) && - ReadParam(m, iter, &p->forward) && - ReadParam(m, iter, &p->match_case) && - ReadParam(m, iter, &p->find_next); - } - static void Log(const param_type& p, std::wstring* l) { - l->append(L"<FindInPageRequest>"); - } -}; - // Traits for net::UploadData::Element. template <> struct ParamTraits<net::UploadData::Element> { @@ -1106,7 +1082,7 @@ struct ParamTraits<NavigationGesture> { } static void Log(const param_type& p, std::wstring* l) { std::wstring event; - switch(p) { + switch (p) { case NavigationGestureUser: event = L"GESTURE_USER"; break; @@ -1192,7 +1168,7 @@ struct ParamTraits<URLRequestStatus> { } static void Log(const param_type& p, std::wstring* l) { std::wstring status; - switch(p.status()) { + switch (p.status()) { case URLRequestStatus::SUCCESS: status = L"SUCCESS"; break; @@ -1530,5 +1506,4 @@ struct ParamTraits<WebDropData> { } // namespace IPC -#endif // CHROME_COMMON_RENDER_MESSAGES_H__ - +#endif // CHROME_COMMON_RENDER_MESSAGES_H_ diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 29599f1..973c6da 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -13,7 +13,6 @@ #include "base/shared_memory.h" #include "chrome/common/ipc_message_macros.h" #include "webkit/glue/dom_operations.h" -#include "webkit/glue/find_in_page_request.h" #include "webkit/glue/console_message_level.h" #include "webkit/glue/context_node_types.h" #include "webkit/glue/webcursor.h" @@ -712,7 +711,7 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) // A message for an external host. // |receiver| can be a receiving script and |message| is any - // arbitrary string that makes sense to the receiver. For + // arbitrary string that makes sense to the receiver. For // example, a user of automation can use it to execute a script // in the form of javascript:receiver("message"); IPC_MESSAGE_ROUTED2(ViewHostMsg_ForwardMessageToExternalHost, |