⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 275091 in webkit


Ignore:
Timestamp:
Mar 26, 2021, 4:07:44 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Fix NowPlayingInfoArtwork operator== logic.
https://bugs.webkit.org/show_bug.cgi?id=223730
<rdar://problem/75822687>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-03-26
Reviewed by Youenn Fablet.

Source/WebCore:

Gtest NowPlayingInfoArtworkTest added .

  • platform/audio/NowPlayingInfo.h:

(WebCore::NowPlayingInfoArtwork::operator== const):
(WebCore::NowPlayingInfoArtwork::operator!= const):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp: Added.

(TestWebKitAPI::testEmptyArtwork):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275087 r275091  
     12021-03-26  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Fix NowPlayingInfoArtwork operator== logic.
     4        https://bugs.webkit.org/show_bug.cgi?id=223730
     5        <rdar://problem/75822687>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Gtest NowPlayingInfoArtworkTest added .
     10
     11        * platform/audio/NowPlayingInfo.h:
     12        (WebCore::NowPlayingInfoArtwork::operator== const):
     13        (WebCore::NowPlayingInfoArtwork::operator!= const):
     14
    1152021-03-26  Rob Buis  <rbuis@igalia.com>
    216
  • trunk/Source/WebCore/platform/audio/NowPlayingInfo.h

    r274586 r275091  
    4242    bool operator==(const NowPlayingInfoArtwork& other) const
    4343    {
    44         return *this != other;
     44        return src == other.src && mimeType == other.mimeType;
    4545    }
    4646
    4747    bool operator!=(const NowPlayingInfoArtwork& other) const
    4848    {
    49         return src != other.src || mimeType != other.mimeType;
     49        return !(*this == other);
    5050    }
    5151
  • trunk/Tools/ChangeLog

    r275081 r275091  
     12021-03-26  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Fix NowPlayingInfoArtwork operator== logic.
     4        https://bugs.webkit.org/show_bug.cgi?id=223730
     5        <rdar://problem/75822687>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * TestWebKitAPI/CMakeLists.txt:
     10        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     11        * TestWebKitAPI/Tests/WebCore/NowPlayingInfoTests.cpp: Added.
     12        (TestWebKitAPI::testEmptyArtwork):
     13        (TestWebKitAPI::TEST):
     14
    1152021-03-25  Cameron McCormack  <heycam@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/CMakeLists.txt

    r273776 r275091  
    184184        Tests/WebCore/LayoutUnitTests.cpp
    185185        Tests/WebCore/MIMETypeRegistry.cpp
     186        Tests/WebCore/NowPlayingInfoTests.cpp
    186187        Tests/WebCore/ParsedContentRange.cpp
    187188        Tests/WebCore/PublicSuffix.cpp
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r275072 r275091  
    319319                5142B2731517C8C800C32B19 /* ContextMenuCanCopyURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */; };
    320320                514958BE1F7427AC00E87BAD /* WKWebViewAutofillTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514958BD1F7427AC00E87BAD /* WKWebViewAutofillTests.mm */; };
     321                5159F267260D43E300B2DA3C /* NowPlayingInfoTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5159F266260D43E300B2DA3C /* NowPlayingInfoTests.cpp */; };
    321322                515BE16F1D428BB100DD7C68 /* StoreBlobToBeDeleted.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 515BE16E1D4288FF00DD7C68 /* StoreBlobToBeDeleted.html */; };
    322323                515BE1711D428E4B00DD7C68 /* StoreBlobThenDelete.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */; };
     
    20972098                5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ContextMenuCanCopyURL.html; sourceTree = "<group>"; };
    20982099                514958BD1F7427AC00E87BAD /* WKWebViewAutofillTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewAutofillTests.mm; sourceTree = "<group>"; };
     2100                5159F266260D43E300B2DA3C /* NowPlayingInfoTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NowPlayingInfoTests.cpp; sourceTree = "<group>"; };
    20992101                515BE16E1D4288FF00DD7C68 /* StoreBlobToBeDeleted.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = StoreBlobToBeDeleted.html; sourceTree = "<group>"; };
    21002102                515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StoreBlobThenDelete.mm; sourceTree = "<group>"; };
     
    36273629                                CE1866471F72E8F100A0CAB6 /* MarkedText.cpp */,
    36283630                                A5B149DD1F5A19DC00C6DAFF /* MIMETypeRegistry.cpp */,
     3631                                5159F266260D43E300B2DA3C /* NowPlayingInfoTests.cpp */,
    36293632                                CD225C071C45A69200140761 /* ParsedContentRange.cpp */,
    36303633                                AA96CAB421C7DB4200FD2F97 /* ParsedContentType.cpp */,
     
    54755478                                CD2D0D1A213465560018C784 /* NowPlaying.mm in Sources */,
    54765479                                2ECFF5551D9B12F800B55394 /* NowPlayingControlsTests.mm in Sources */,
     5480                                5159F267260D43E300B2DA3C /* NowPlayingInfoTests.cpp in Sources */,
    54775481                                A10F047E1E3AD29C00C95E19 /* NSFileManagerExtras.mm in Sources */,
    54785482                                F442851D2140DF2900CCDA22 /* NSFontPanelTesting.mm in Sources */,
Note: See TracChangeset for help on using the changeset viewer.