summaryrefslogtreecommitdiffstats
path: root/Tools/WebKitTestRunner/TestController.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-13 16:23:25 +0100
committerBen Murdoch <benm@google.com>2011-05-16 11:35:02 +0100
commit65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch)
treef478babb801e720de7bfaee23443ffe029f58731 /Tools/WebKitTestRunner/TestController.cpp
parent47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff)
downloadexternal_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz
external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Tools/WebKitTestRunner/TestController.cpp')
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 3ea46ee..699982e 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -97,6 +97,12 @@ static void setWindowFrameOtherPage(WKPageRef page, WKRect frame, const void* cl
view->setWindowFrame(frame);
}
+static bool runBeforeUnloadConfirmPanel(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo)
+{
+ printf("%s\n", toSTD(message).c_str());
+ return true;
+}
+
static void closeOtherPage(WKPageRef page, const void* clientInfo)
{
WKPageClose(page);
@@ -134,11 +140,12 @@ static WKPageRef createOtherPage(WKPageRef oldPage, WKDictionaryRef, WKEventModi
0, // setIsResizable
getWindowFrameOtherPage,
setWindowFrameOtherPage,
- 0, // runBeforeUnloadConfirmPanel
+ runBeforeUnloadConfirmPanel,
0, // didDraw
0, // pageDidScroll
0, // exceededDatabaseQuota
- 0 // runOpenPanel
+ 0, // runOpenPanel
+ 0, // decidePolicyForGeolocationPermissionRequest
};
WKPageSetPageUIClient(newPage, &otherPageUIClient);
@@ -238,11 +245,12 @@ void TestController::initialize(int argc, const char* argv[])
0, // setIsResizable
getWindowFrameMainPage,
setWindowFrameMainPage,
- 0, // runBeforeUnloadConfirmPanel
+ runBeforeUnloadConfirmPanel,
0, // didDraw
0, // pageDidScroll
0, // exceededDatabaseQuota
- 0 // runOpenPanel
+ 0, // runOpenPanel
+ 0, // decidePolicyForGeolocationPermissionRequest
};
WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);
@@ -270,7 +278,7 @@ void TestController::initialize(int argc, const char* argv[])
0, // didFinishProgress
0, // didBecomeUnresponsive
0, // didBecomeResponsive
- 0, // processDidExit
+ processDidCrash, // processDidCrash
0 // didChangeBackForwardList
};
WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
@@ -393,6 +401,11 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKT
static_cast<TestController*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(page, frame);
}
+void TestController::processDidCrash(WKPageRef page, const void* clientInfo)
+{
+ static_cast<TestController*>(const_cast<void*>(clientInfo))->processDidCrash(page);
+}
+
void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame)
{
if (m_state != Resetting)
@@ -409,4 +422,10 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame)
shared().notifyDone();
}
+void TestController::processDidCrash(WKPageRef page)
+{
+ fputs("#CRASHED - WebProcess\n", stderr);
+ fflush(stderr);
+}
+
} // namespace WTR