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

Unified Diff: extensions/renderer/script_context_set_unittest.cc

Issue 1210513002: ScriptContextSetTest should close the main frame before finishing the test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context_set_unittest.cc
diff --git a/extensions/renderer/script_context_set_unittest.cc b/extensions/renderer/script_context_set_unittest.cc
index 44da610fc9c5cd5c0525a56f47926cf8c9e6bf10..9d0a30e22a5a24b05470ce30cfb655558dbc79bf 100644
--- a/extensions/renderer/script_context_set_unittest.cc
+++ b/extensions/renderer/script_context_set_unittest.cc
@@ -12,6 +12,7 @@
#include "extensions/renderer/script_context_set.h"
#include "gin/public/context_holder.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/web/WebHeap.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h"
@@ -60,6 +61,11 @@ TEST(ScriptContextSetTest, Lifecycle) {
// After removal, the context should be marked for destruction.
EXPECT_FALSE(context->is_valid());
+ webview->close();
+ frame->close();
+
+ blink::WebHeap::collectAllGarbageForTesting();
not at google - send to devlin 2015/06/24 16:08:47 This will probably regress at some point in the fu
+
// Run loop to do the actual deletion.
loop.RunUntilIdle();
}
« 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