WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
133324
Need an API test for
bug #133193
(
r169315
)
https://bugs.webkit.org/show_bug.cgi?id=133324
Summary
Need an API test for bug #133193 (r169315)
Jon Honeycutt
Reported
2014-05-27 14:16:46 PDT
Need an API test for
bug #133193
(
r169315
).
Attachments
Patch
(14.85 KB, patch)
2014-05-27 15:17 PDT
,
Jon Honeycutt
aestes
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jon Honeycutt
Comment 1
2014-05-27 15:17:23 PDT
Created
attachment 232151
[details]
Patch
Andy Estes
Comment 2
2014-05-28 08:04:33 PDT
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.
Jon Honeycutt
Comment 3
2014-05-28 10:46:58 PDT
(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.
Jon Honeycutt
Comment 4
2014-05-28 12:21:51 PDT
Committed
r169429
: <
http://trac.webkit.org/changeset/169429
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug