Pump the v8 message loop in tests
authorJochen Eisinger <jochen@chromium.org>
Wed, 15 Jul 2015 12:28:17 +0000 (14:28 +0200)
committerJochen Eisinger <jochen@chromium.org>
Wed, 15 Jul 2015 12:28:17 +0000 (14:28 +0200)
R=tsepez@chromium.org, ulan@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1230393006 .

samples/pdfium_test.cc
testing/embedder_test.cpp

index 5147266..be12614 100644 (file)
@@ -616,6 +616,8 @@ int main(int argc, const char* argv[]) {
     if (!file_contents)
       continue;
     RenderPdf(filename, file_contents, file_length, options);
+    while (v8::platform::PumpMessageLoop(platform, v8::Isolate::GetCurrent()))
+      continue;
     free(file_contents);
   }
 
index ee2ad08..ba33ca6 100644 (file)
@@ -173,6 +173,8 @@ void EmbedderTest::TearDown() {
     FPDF_CloseDocument(document_);
     FPDFDOC_ExitFormFillEnvironment(form_handle_);
   }
+  while (v8::platform::PumpMessageLoop(platform_, v8::Isolate::GetCurrent()))
+    continue;
   FPDFAvail_Destroy(avail_);
   FPDF_DestroyLibrary();
   v8::V8::ShutdownPlatform();