summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/api/public/WebKit.h3
-rw-r--r--webkit/api/src/WebKit.cpp5
-rw-r--r--webkit/tools/test_shell/test_shell.cc8
3 files changed, 10 insertions, 6 deletions
diff --git a/webkit/api/public/WebKit.h b/webkit/api/public/WebKit.h
index a3e8086..f824808 100644
--- a/webkit/api/public/WebKit.h
+++ b/webkit/api/public/WebKit.h
@@ -77,6 +77,9 @@ namespace WebKit {
WEBKIT_API void registerExtension(v8::Extension*,
const WebString& schemeRestriction);
+ // Process any pending JavaScript console messages.
+ WEBKIT_API void flushConsoleMessages();
+
// Enables HTML5 media support.
WEBKIT_API void enableMediaPlayer();
diff --git a/webkit/api/src/WebKit.cpp b/webkit/api/src/WebKit.cpp
index 085c31c..0bdbf42 100644
--- a/webkit/api/src/WebKit.cpp
+++ b/webkit/api/src/WebKit.cpp
@@ -106,6 +106,11 @@ void registerExtension(v8::Extension* extension,
WebCore::V8Proxy::registerExtension(extension, schemeRestriction);
}
+void flushConsoleMessages()
+{
+ WebCore::V8Proxy::processConsoleMessages();
+}
+
void enableMediaPlayer()
{
#if ENABLE(VIDEO)
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index a9d4765..07add97 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -2,11 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// TODO(dumi): expose V8Proxy::processConsoleMessages() through
-// a function in WebKit.h and remove the next 2 includes
-// http://code.google.com/p/chromium/issues/detail?id=17300
-#include "config.h"
-#include "V8Proxy.h"
#undef LOG
#include "webkit/tools/test_shell/test_shell.h"
@@ -37,6 +32,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "webkit/api/public/WebRect.h"
+#include "webkit/api/public/WebKit.h"
#include "webkit/api/public/WebSize.h"
#include "webkit/api/public/WebString.h"
#include "webkit/api/public/WebURL.h"
@@ -188,7 +184,7 @@ void TestShell::Dump(TestShell* shell) {
if ((shell == NULL) || ((params = shell->test_params()) == NULL))
return;
- WebCore::V8Proxy::processConsoleMessages();
+ WebKit::flushConsoleMessages();
// Echo the url in the output so we know we're not getting out of sync.
printf("#URL:%s\n", params->test_url.c_str());