Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 1532053002: use variadic macros/templates in IPC message implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ipc_fuzzer build again Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
26 #include "content/public/renderer/content_renderer_client.h" 26 #include "content/public/renderer/content_renderer_client.h"
27 #include "content/renderer/render_process_impl.h" 27 #include "content/renderer/render_process_impl.h"
28 #include "content/test/mock_render_process.h" 28 #include "content/test/mock_render_process.h"
29 #include "content/test/render_thread_impl_browser_test_ipc_helper.h" 29 #include "content/test/render_thread_impl_browser_test_ipc_helper.h"
30 #include "gpu/GLES2/gl2extchromium.h" 30 #include "gpu/GLES2/gl2extchromium.h"
31 #include "testing/gtest/include/gtest/gtest.h" 31 #include "testing/gtest/include/gtest/gtest.h"
32 32
33 // IPC messages for testing ---------------------------------------------------- 33 // IPC messages for testing ----------------------------------------------------
34 34
35 // TODO(mdempsky): Fix properly by moving into a separate
36 // browsertest_message_generator.cc file.
37 #undef IPC_IPC_MESSAGE_MACROS_H_
38 #undef IPC_MESSAGE_EXTRA
35 #define IPC_MESSAGE_IMPL 39 #define IPC_MESSAGE_IMPL
36 #include "ipc/ipc_message_macros.h" 40 #include "ipc/ipc_message_macros.h"
41 #include "ipc/ipc_message_templates_impl.h"
37 42
38 #undef IPC_MESSAGE_START 43 #undef IPC_MESSAGE_START
39 #define IPC_MESSAGE_START TestMsgStart 44 #define IPC_MESSAGE_START TestMsgStart
40 IPC_MESSAGE_CONTROL0(TestMsg_QuitRunLoop) 45 IPC_MESSAGE_CONTROL0(TestMsg_QuitRunLoop)
41 46
42 // ----------------------------------------------------------------------------- 47 // -----------------------------------------------------------------------------
43 48
44 // These tests leak memory, this macro disables the test when under the 49 // These tests leak memory, this macro disables the test when under the
45 // LeakSanitizer. 50 // LeakSanitizer.
46 #ifdef LEAK_SANITIZER 51 #ifdef LEAK_SANITIZER
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); 242 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, ""));
238 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); 243 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop());
239 244
240 test_helper_->GetMessageLoop()->Run(); 245 test_helper_->GetMessageLoop()->Run();
241 246
242 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); 247 EXPECT_EQ(0, test_task_counter_->NumTasksPosted());
243 } 248 }
244 249
245 } // namespace 250 } // namespace
246 } // namespace content 251 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698