Index: content/renderer/render_view_browsertest.cc |
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc |
index 8c98001097f0fe4f63a7dd455a90d75f89ba046c..868be6fa4836a755b62721625000590bc6a90d60 100644 |
--- a/content/renderer/render_view_browsertest.cc |
+++ b/content/renderer/render_view_browsertest.cc |
@@ -59,6 +59,7 @@ |
#include "third_party/WebKit/public/platform/WebURLResponse.h" |
#include "third_party/WebKit/public/web/WebDataSource.h" |
#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
+#include "third_party/WebKit/public/web/WebHeap.h" |
#include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
#include "third_party/WebKit/public/web/WebHistoryItem.h" |
#include "third_party/WebKit/public/web/WebLocalFrame.h" |
@@ -87,6 +88,7 @@ |
#include "url/url_constants.h" |
using blink::WebFrame; |
+using blink::WebHeap; |
using blink::WebInputEvent; |
using blink::WebLocalFrame; |
using blink::WebMouseEvent; |
@@ -171,6 +173,13 @@ class RenderViewImplTest : public RenderViewTest { |
RenderViewTest::SetUp(); |
} |
+ // To avoid flaky leak reports, insist on GCing |
+ // Blink upon shutdown to clear out garbage. |
+ void TearDown() override { |
+ WebHeap::collectGarbageForTesting(); |
haraken
2016/01/24 09:27:56
collectAllGarbageForTesting would be better.
sof
2016/01/24 12:35:18
That's what I thought would be tidier too, but for
|
+ RenderViewTest::TearDown(); |
+ } |
+ |
RenderViewImpl* view() { |
return static_cast<RenderViewImpl*>(view_); |
} |
@@ -501,7 +510,6 @@ TEST_F(RenderViewImplTest, OnNavStateChanged) { |
EXPECT_TRUE(render_thread_->sink().GetUniqueMessageMatching( |
ViewHostMsg_UpdateState::ID)); |
} |
- ProcessPendingMessages(); |
} |
TEST_F(RenderViewImplTest, OnNavigationHttpPost) { |