diff options
Diffstat (limited to 'Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp')
-rw-r--r-- | Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp index d042431..00933bd 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp @@ -72,7 +72,7 @@ void InjectedBundle::didReceiveMessage(WKBundleRef bundle, WKStringRef messageNa static_cast<InjectedBundle*>(const_cast<void*>(clientInfo))->didReceiveMessage(messageName, messageBody); } -void InjectedBundle::initialize(WKBundleRef bundle) +void InjectedBundle::initialize(WKBundleRef bundle, WKTypeRef initializationUserData) { m_bundle = bundle; @@ -86,6 +86,8 @@ void InjectedBundle::initialize(WKBundleRef bundle) }; WKBundleSetClient(m_bundle, &client); + platformInitialize(initializationUserData); + activateFonts(); WKBundleActivateMacFontAscentHack(m_bundle); } @@ -173,7 +175,15 @@ void InjectedBundle::done() setTopLoadingFrame(0); WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithUTF8CString("Done")); - WKRetainPtr<WKStringRef> doneMessageBody(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str())); + WKRetainPtr<WKMutableDictionaryRef> doneMessageBody(AdoptWK, WKMutableDictionaryCreate()); + + WKRetainPtr<WKStringRef> textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput")); + WKRetainPtr<WKStringRef> textOutput(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str())); + WKDictionaryAddItem(doneMessageBody.get(), textOutputKey.get(), textOutput.get()); + + WKRetainPtr<WKStringRef> textOnlyKey(AdoptWK, WKStringCreateWithUTF8CString("TextOnly")); + WKRetainPtr<WKBooleanRef> textOnly(AdoptWK, WKBooleanCreate(!m_layoutTestController->shouldDumpPixels())); + WKDictionaryAddItem(doneMessageBody.get(), textOnlyKey.get(), textOnly.get()); WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get()); |