diff --git a/mozilla/htmlparser/tests/grabpage/grabpage.cpp b/mozilla/htmlparser/tests/grabpage/grabpage.cpp
index 318def743e0..01a4f7c0d51 100644
--- a/mozilla/htmlparser/tests/grabpage/grabpage.cpp
+++ b/mozilla/htmlparser/tests/grabpage/grabpage.cpp
@@ -60,6 +60,11 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include
#include
#endif
+#ifdef XP_OS2
+#include
+#include
+#include
+#endif
class StreamToFile : public nsIStreamListener {
public:
@@ -260,6 +265,14 @@ PageGrabber::Grab(const nsAFlatCString& aURL)
}
}
#endif
+ #ifdef XP_OS2
+ QMSG qmsg;
+ while ( !copier->IsDone() ) {
+ if (WinPeekMsg(0, &qmsg, NULL, 0, 0, PM_REMOVE)) {
+ WinDispatchMsg(0, &qmsg);
+ }
+ }
+ #endif
error = copier->HaveError();
NS_RELEASE(copier);
diff --git a/mozilla/parser/htmlparser/tests/grabpage/grabpage.cpp b/mozilla/parser/htmlparser/tests/grabpage/grabpage.cpp
index 318def743e0..01a4f7c0d51 100644
--- a/mozilla/parser/htmlparser/tests/grabpage/grabpage.cpp
+++ b/mozilla/parser/htmlparser/tests/grabpage/grabpage.cpp
@@ -60,6 +60,11 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
#include
#include
#endif
+#ifdef XP_OS2
+#include
+#include
+#include
+#endif
class StreamToFile : public nsIStreamListener {
public:
@@ -260,6 +265,14 @@ PageGrabber::Grab(const nsAFlatCString& aURL)
}
}
#endif
+ #ifdef XP_OS2
+ QMSG qmsg;
+ while ( !copier->IsDone() ) {
+ if (WinPeekMsg(0, &qmsg, NULL, 0, 0, PM_REMOVE)) {
+ WinDispatchMsg(0, &qmsg);
+ }
+ }
+ #endif
error = copier->HaveError();
NS_RELEASE(copier);