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

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

Issue 337783002: Remove EnableThreadedCompositing from the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thread: rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/public/browser/content_browser_client.h" 6 #include "content/public/browser/content_browser_client.h"
7 #include "content/public/common/content_client.h" 7 #include "content/public/common/content_client.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "content/public/renderer/content_renderer_client.h" 9 #include "content/public/renderer/content_renderer_client.h"
10 #include "content/renderer/render_process_impl.h" 10 #include "content/renderer/render_process_impl.h"
(...skipping 25 matching lines...) Expand all
36 // Disabled under LeakSanitizer due to memory leaks. http://crbug.com/348994 36 // Disabled under LeakSanitizer due to memory leaks. http://crbug.com/348994
37 #if defined(LEAK_SANITIZER) 37 #if defined(LEAK_SANITIZER)
38 #define MAYBE_InputHandlerManagerDestroyedAfterCompositorThread \ 38 #define MAYBE_InputHandlerManagerDestroyedAfterCompositorThread \
39 DISABLED_InputHandlerManagerDestroyedAfterCompositorThread 39 DISABLED_InputHandlerManagerDestroyedAfterCompositorThread
40 #else 40 #else
41 #define MAYBE_InputHandlerManagerDestroyedAfterCompositorThread \ 41 #define MAYBE_InputHandlerManagerDestroyedAfterCompositorThread \
42 InputHandlerManagerDestroyedAfterCompositorThread 42 InputHandlerManagerDestroyedAfterCompositorThread
43 #endif 43 #endif
44 TEST_F(RenderThreadImplBrowserTest, 44 TEST_F(RenderThreadImplBrowserTest,
45 MAYBE_InputHandlerManagerDestroyedAfterCompositorThread) { 45 MAYBE_InputHandlerManagerDestroyedAfterCompositorThread) {
46 CommandLine::ForCurrentProcess()->AppendSwitch(
47 switches::kEnableThreadedCompositing);
48
49 ContentClient content_client; 46 ContentClient content_client;
50 ContentBrowserClient content_browser_client; 47 ContentBrowserClient content_browser_client;
51 ContentRendererClient content_renderer_client; 48 ContentRendererClient content_renderer_client;
52 SetContentClient(&content_client); 49 SetContentClient(&content_client);
53 SetBrowserClientForTesting(&content_browser_client); 50 SetBrowserClientForTesting(&content_browser_client);
54 SetRendererClientForTesting(&content_renderer_client); 51 SetRendererClientForTesting(&content_renderer_client);
55 base::MessageLoopForIO message_loop_; 52 base::MessageLoopForIO message_loop_;
56 53
57 std::string channel_id = IPC::Channel::GenerateVerifiedChannelID( 54 std::string channel_id = IPC::Channel::GenerateVerifiedChannelID(
58 std::string()); 55 std::string());
59 DummyListener dummy_listener; 56 DummyListener dummy_listener;
60 scoped_ptr<IPC::Channel> channel( 57 scoped_ptr<IPC::Channel> channel(
61 IPC::Channel::CreateServer(channel_id, &dummy_listener)); 58 IPC::Channel::CreateServer(channel_id, &dummy_listener));
62 ASSERT_TRUE(channel->Connect()); 59 ASSERT_TRUE(channel->Connect());
63 60
64 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess); 61 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess);
65 // Owned by mock_process. 62 // Owned by mock_process.
66 RenderThreadImpl* thread = new RenderThreadImpl(channel_id); 63 RenderThreadImpl* thread = new RenderThreadImpl(channel_id);
67 thread->EnsureWebKitInitialized(); 64 thread->EnsureWebKitInitialized();
68 65
69 ASSERT_TRUE(thread->input_handler_manager()); 66 ASSERT_TRUE(thread->input_handler_manager());
70 67
71 thread->compositor_message_loop_proxy()->PostTask( 68 thread->compositor_message_loop_proxy()->PostTask(
72 FROM_HERE, 69 FROM_HERE,
73 base::Bind(&CheckRenderThreadInputHandlerManager, thread)); 70 base::Bind(&CheckRenderThreadInputHandlerManager, thread));
74 } 71 }
75 72
76 } // namespace 73 } // namespace
77 } // namespace content 74 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698