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

Side by Side Diff: chrome/renderer/render_widget_unittest.cc

Issue 4333: Disable tests because it is leaking memory (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/ref_counted.h" 7 #include "base/ref_counted.h"
8 #include "chrome/renderer/render_widget.h" 8 #include "chrome/renderer/render_widget.h"
9 #include "chrome/renderer/render_thread.h" 9 #include "chrome/renderer/render_thread.h"
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int32 routing_id_; 109 int32 routing_id_;
110 // Opener id reported by the Widget. 110 // Opener id reported by the Widget.
111 int32 opener_id_; 111 int32 opener_id_;
112 // We only keep track of one Widget, we learn its pointer when it 112 // We only keep track of one Widget, we learn its pointer when it
113 // adds a new route. 113 // adds a new route.
114 IPC::Channel::Listener* widget_; 114 IPC::Channel::Listener* widget_;
115 // The last known good deserializer for sync messages. 115 // The last known good deserializer for sync messages.
116 IPC::MessageReplyDeserializer* reply_deserializer_; 116 IPC::MessageReplyDeserializer* reply_deserializer_;
117 }; 117 };
118 118
119 TEST(RenderWidgetTest, CreateAndCloseWidget) { 119 TEST(RenderWidgetTest, DISABLED_CreateAndCloseWidget) {
120 MessageLoop msg_loop; 120 MessageLoop msg_loop;
121 MockRenderThread render_thread; 121 MockRenderThread render_thread;
122 122
123 const int32 kRouteId = 5; 123 const int32 kRouteId = 5;
124 const int32 kOpenerId = 7; 124 const int32 kOpenerId = 7;
125 125
126 render_thread.set_routing_id(kRouteId); 126 render_thread.set_routing_id(kRouteId);
127 scoped_refptr<RenderWidget> rw = 127 scoped_refptr<RenderWidget> rw =
128 RenderWidget::Create(kOpenerId, &render_thread); 128 RenderWidget::Create(kOpenerId, &render_thread);
129 ASSERT_TRUE(rw != NULL); 129 ASSERT_TRUE(rw != NULL);
130 130
131 // After the RenderWidget it must have sent a message to the render thread 131 // After the RenderWidget it must have sent a message to the render thread
132 // that sets the opener id. 132 // that sets the opener id.
133 EXPECT_EQ(kOpenerId, render_thread.opener_id()); 133 EXPECT_EQ(kOpenerId, render_thread.opener_id());
134 ASSERT_TRUE(render_thread.has_widget()); 134 ASSERT_TRUE(render_thread.has_widget());
135 135
136 // Now simulate a close of the Widget. 136 // Now simulate a close of the Widget.
137 render_thread.SendCloseMessage(); 137 render_thread.SendCloseMessage();
138 EXPECT_FALSE(render_thread.has_widget()); 138 EXPECT_FALSE(render_thread.has_widget());
139 } 139 }
140 140
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698