Bug 171350 - [WebCrypto] Add an api test for testing wrapping/unwrapping serialized crypto keys
Summary: [WebCrypto] Add an api test for testing wrapping/unwrapping serialized crypto...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jiewen Tan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-26 16:18 PDT by Jiewen Tan
Modified: 2017-05-03 16:50 PDT (History)
5 users (show)

See Also:


Attachments
Patch (15.67 KB, patch)
2017-04-26 16:25 PDT, Jiewen Tan
bfulgham: review+
bfulgham: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (15.65 KB, patch)
2017-05-03 12:31 PDT, Jiewen Tan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiewen Tan 2017-04-26 16:18:25 PDT
Add an api test for testing wrapping/unwrapping serialized crypto keys.
Comment 1 Jiewen Tan 2017-04-26 16:19:11 PDT
<rdar://problem/28600836>
Comment 2 Jiewen Tan 2017-04-26 16:25:05 PDT
Created attachment 308303 [details]
Patch
Comment 3 Brent Fulgham 2017-05-03 09:04:14 PDT
Comment on attachment 308303 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308303&action=review

This looks good, but I think your test case is wrong in the openRequest.onerror handler. Can you please fix before landing?

> Tools/TestWebKitAPI/Tests/WebKit2/navigation-client-default-crypto.html:49
> +        finishJSTest();

There are no definitions for "testFailed" or "finishJSTest" in TestWebKitAPI -- I'm surprised this doesn't create an error when you run.

Please remove these lines and switch to "alert("FAIL")" or something for these failure case.
Comment 4 Jiewen Tan 2017-05-03 12:16:24 PDT
Comment on attachment 308303 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308303&action=review

Thanks Brent for r+ the patch.

>> Tools/TestWebKitAPI/Tests/WebKit2/navigation-client-default-crypto.html:49
>> +        finishJSTest();
> 
> There are no definitions for "testFailed" or "finishJSTest" in TestWebKitAPI -- I'm surprised this doesn't create an error when you run.
> 
> Please remove these lines and switch to "alert("FAIL")" or something for these failure case.

I think that's because those code paths are never executed.
Comment 5 Jiewen Tan 2017-05-03 12:31:55 PDT
Created attachment 308939 [details]
Patch for landing
Comment 6 Jiewen Tan 2017-05-03 16:50:52 PDT
Committed r216157: <http://trac.webkit.org/changeset/216157>