Need an API test for bug #133193 (r169315).
Created attachment 232151 [details] Patch
Comment on attachment 232151 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232151&action=review r=me, but the StopLoadingDuringDidFailProvisionalLoadTestDone message seems superfluous. > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:41 > +static void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo) > +{ > + if (WKStringIsEqualToUTF8CString(messageName, "StopLoadingDuringDidFailProvisionalLoadTestDone")) > + receivedMessageFromBundle = true; > +} I'm not sure I understand the purpose of the StopLoadingDuringDidFailProvisionalLoadTestDone message. > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:48 > + injectedBundleClient.base.version = 0; You already memset the entire struct to 0. > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:57 > + ASSERT(receivedMessageFromBundle); You should use EXPECT_TRUE() instead. > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:70 > + loaderClient.base.version = 0; You already memset the entire struct to 0.
(In reply to comment #2) > (From update of attachment 232151 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=232151&action=review > > r=me, but the StopLoadingDuringDidFailProvisionalLoadTestDone message seems superfluous. > > > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:41 > > +static void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo) > > +{ > > + if (WKStringIsEqualToUTF8CString(messageName, "StopLoadingDuringDidFailProvisionalLoadTestDone")) > > + receivedMessageFromBundle = true; > > +} > > I'm not sure I understand the purpose of the StopLoadingDuringDidFailProvisionalLoadTestDone message. It's there to ensure that the injected bundle loaded and that it called 'stop loading' during the 'did fail provisional load' callback before the UI process received notice of the failed load. > > > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:48 > > + injectedBundleClient.base.version = 0; > > You already memset the entire struct to 0. Fixed. > > > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:57 > > + ASSERT(receivedMessageFromBundle); > > You should use EXPECT_TRUE() instead. Fixed. > > > Tools/TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:70 > > + loaderClient.base.version = 0; > > You already memset the entire struct to 0. Fixed.
Committed r169429: <http://trac.webkit.org/changeset/169429>