Bug 116445

Summary: Move MD5, SHA1 unit tests from WTF to TestWebKitAPI
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, gyuyoung.kim, rakuco
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Provisional patch
none
Patch
none
Patch for landing none

Zan Dobersek
Reported 2013-05-20 10:31:54 PDT
Move MD5, SHA1 unit tests from WTF to TestWebKitAPI
Attachments
Provisional patch (16.53 KB, patch)
2013-05-20 10:43 PDT, Zan Dobersek
no flags
Patch (20.97 KB, patch)
2013-05-30 12:00 PDT, Zan Dobersek
no flags
Patch for landing (20.22 KB, patch)
2013-05-31 01:50 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2013-05-20 10:43:40 PDT
Created attachment 202291 [details] Provisional patch Still needs to add the new files to the XCode build system.
Zan Dobersek
Comment 2 2013-05-30 12:00:19 PDT
Benjamin Poulain
Comment 3 2013-05-30 16:28:29 PDT
Comment on attachment 203369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=203369&action=review Great! > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:761 > + CD5393C91757BAC400C07123 /* SHA1.cpp */, > + CD5393C71757BA9700C07123 /* MD5.cpp */, The build section should be sorted alphabetically. > Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:1182 > 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */, > + CD5393C81757BA9700C07123 /* MD5.cpp in Sources */, > + CD5393CA1757BAC400C07123 /* SHA1.cpp in Sources */, Ditto. > Tools/TestWebKitAPI/Tests/WTF/MD5.cpp:29 > +/* > + * Copyright (C) 2010 Google Inc. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions are > + * met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above > + * copyright notice, this list of conditions and the following disclaimer > + * in the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Google Inc. nor the names of its > + * contributors may be used to endorse or promote products derived from > + * this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ I am not sure this is the right copyright. If the test comes from the original sqlite code, it should be the one starting with "This code implements the MD5 message-digest algorithm." > Tools/TestWebKitAPI/Tests/WTF/MD5.cpp:54 > + // MD5 Test suite from http://www.ietf.org/rfc/rfc1321.txt Missing period. > Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp:1 > +/* ditto for the copyright.
Zan Dobersek
Comment 4 2013-05-31 01:01:27 PDT
Comment on attachment 203369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=203369&action=review >> Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp:1 >> +/* > > ditto for the copyright. There's no other copyright located in Source/WTF/wtf/SHA1.cpp apart from this one and the three lines of comment about RFC3174 that I don't believe count as copyright. Should I leave this one as it is or concoct something third?
Benjamin Poulain
Comment 5 2013-05-31 01:43:26 PDT
(In reply to comment #4) > There's no other copyright located in Source/WTF/wtf/SHA1.cpp apart from this one and the three lines of comment about RFC3174 that I don't believe count as copyright. > Should I leave this one as it is or concoct something third? You are right, my bad. I assumed that was the same as the other file.
Zan Dobersek
Comment 6 2013-05-31 01:50:49 PDT
Created attachment 203424 [details] Patch for landing
Zan Dobersek
Comment 7 2013-05-31 01:59:48 PDT
(In reply to comment #6) > Created an attachment (id=203424) [details] > Patch for landing Addressed the review comments. Uses the Source/WTF/wtf/MD5.cpp copyright that explains the origin of this code but omits the instructions on how to use the MD5 class as that's not relevant here. Benjamin, can you please cq+ if the patch looks OK to you now?
Benjamin Poulain
Comment 8 2013-05-31 02:10:48 PDT
Comment on attachment 203424 [details] Patch for landing Looks good.
WebKit Commit Bot
Comment 9 2013-05-31 03:06:25 PDT
Comment on attachment 203424 [details] Patch for landing Clearing flags on attachment: 203424 Committed r151012: <http://trac.webkit.org/changeset/151012>
WebKit Commit Bot
Comment 10 2013-05-31 03:06:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.