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

Unified Diff: Source/web/tests/WebUnitTests.cpp

Issue 407453002: ReadableStream initial implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/streams/UnderlyingSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebUnitTests.cpp
diff --git a/Source/web/tests/WebUnitTests.cpp b/Source/web/tests/WebUnitTests.cpp
index 04ac4e8bdd1c781811b2a0d8b15b56932a8fc935..916ecaa1e37c9e8f2742eb7f95ccc3e4d0a39667 100644
--- a/Source/web/tests/WebUnitTests.cpp
+++ b/Source/web/tests/WebUnitTests.cpp
@@ -31,11 +31,13 @@
#include "config.h"
#include "web/tests/WebUnitTests.h"
+#include "platform/heap/Handle.h"
#include <base/bind.h>
#include <base/message_loop/message_loop.h>
#include <base/run_loop.h>
#include <base/test/launcher/unit_test_launcher.h>
#include <base/test/test_suite.h>
+#include <v8.h>
namespace blink {
@@ -45,7 +47,14 @@ int runHelper(TestSuite* testSuite, void (*preTestHook)(void), void (*postTestHo
{
preTestHook();
int result = testSuite->Run();
+
+ // Collect garbage in order to release mock objects referred from v8 or
+ // Oilpan heap. Otherwise false mock leaks will be reported.
+ v8::Isolate::GetCurrent()->RequestGarbageCollectionForTesting(v8::Isolate::kFullGarbageCollection);
+ blink::Heap::collectAllGarbage();
+
postTestHook();
+
return result;
}
« no previous file with comments | « Source/core/streams/UnderlyingSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698