AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Typedefs | Functions | Variables
alexaClientSDK::playlistParser::test Namespace Reference

Classes

class  ContentDecrypterTest
 Test class for ContentDecrypter class. More...
 
class  Id3TagsRemoverTest
 Test class for Id3TagsRemoverTest class. More...
 
class  IterativePlaylistParserTest
 
class  MockContentFetcher
 A mock content fetcher. More...
 
class  MockContentFetcherFactory
 A mock factory that creates mock content fetchers. More...
 
class  PlaylistParserTest
 
class  TestParserObserver
 

Typedefs

using ByteVector = std::vector< unsigned char >
 Alias for bytes. More...
 

Functions

static const ByteVector KEY (16, 0x61)
 Test key: aaaaaaaaaaaaaaaa. More...
 
 TEST_F (ContentDecrypterTest, test_unsupportedEncryption)
 
 TEST_F (ContentDecrypterTest, test_invalidKeyEncryption)
 
 TEST_F (ContentDecrypterTest, test_invalidIVEncryption)
 
 TEST_F (ContentDecrypterTest, test_aESDecryption)
 
 TEST_F (ContentDecrypterTest, test_convertIVNullByteArray)
 
 TEST_F (ContentDecrypterTest, test_convertIVIncorrectLength)
 
 TEST_F (ContentDecrypterTest, test_convertIVNotHex)
 
 TEST_F (ContentDecrypterTest, test_convertIV)
 
 TEST_F (Id3TagsRemoverTest, test_validID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_validID3TagWithOffset)
 
 TEST_F (Id3TagsRemoverTest, test_twoValidID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_invalidID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_partialID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentValidID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentTwoValidID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentPartialID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentCompleteID3Tag)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagAcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3Tag9MatchingAcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagAcrossFullHeaderTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentInvalidID3TagAcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagRemove10BytesAcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary1AcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary2AcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagBoundary3AcrossTwoWrites)
 
 TEST_F (Id3TagsRemoverTest, test_attachmentID3TagRemoveTagAcrossTwoBoundaries)
 
 TEST_F (IterativePlaylistParserTest, test_initializeFailed)
 
 TEST_F (IterativePlaylistParserTest, test_initializeOk)
 
 TEST_F (IterativePlaylistParserTest, test_parsingPlaylist)
 
 TEST_F (IterativePlaylistParserTest, test_parsingHlsPlaylist)
 
 TEST_F (IterativePlaylistParserTest, test_parsingPlsPlaylist)
 
 TEST_F (IterativePlaylistParserTest, test_parsingRelativePlaylist)
 
 TEST_F (IterativePlaylistParserTest, test_parsingLiveStreamPlaylist)
 
 TEST_F (IterativePlaylistParserTest, test_parseMediaUrl)
 
 TEST_F (IterativePlaylistParserTest, test_parseInvalidUrl)
 
 TEST_F (IterativePlaylistParserTest, test_nextFailsAfterAbort)
 
void matchEncryptionInfo (const EncryptionInfo &lhs, const EncryptionInfo &rhs)
 
 TEST (M3UParserTest, test_parseKeyNoMethod)
 
 TEST (M3UParserTest, test_parseKeyMethodNone)
 
 TEST (M3UParserTest, test_parseKeyMissingKeyURL)
 
 TEST (M3UParserTest, test_parseKeyUnknownMethod)
 
 TEST (M3UParserTest, test_parseKeyURLClosingQuote)
 
 TEST (M3UParserTest, test_parseKeyValidURL)
 
 TEST (M3UParserTest, test_parseKeyValidInitVector)
 
 TEST (M3UParserTest, test_parseMediaSequence)
 
 TEST (M3UParserTest, test_parseMediaSequenceNoSpace)
 
 TEST (M3UParserTest, test_parseEmptyMediaSequence)
 
 TEST (M3UParserTest, test_parseManySpacesMediaSequence)
 
 TEST (M3UParserTest, test_parseInvalidMediaSequence)
 
 TEST (M3UParserTest, test_parseKeyEncryptionInfo)
 
 TEST (M3UParserTest, test_parseByteRange)
 
 TEST (M3UParserTest, test_parseByteRangeMissingColon)
 
 TEST (M3UParserTest, test_parseByteRangeMissingAt)
 
 TEST (M3UParserTest, test_parseByteRangeNonDecimal)
 
 TEST (M3UParserTest, test_hLSParseByteRange)
 
 TEST (M3UParserTest, test_parseMAPMissingURL)
 
 TEST (M3UParserTest, test_parseMAPValidURL)
 
 TEST (M3UParserTest, test_parseMAPValidByteRange)
 
 TEST (M3UParserTest, test_hLSParseMAP)
 
 TEST (M3UParserTest, test_masterPlaylist)
 
 TEST_F (PlaylistParserTest, test_emptyUrl)
 
 TEST_F (PlaylistParserTest, test_nullObserver)
 
 TEST_F (PlaylistParserTest, testTimer_parsingPlaylist)
 
 TEST_F (PlaylistParserTest, testTimer_parsingRelativePlaylist)
 
 TEST_F (PlaylistParserTest, testTimer_parsingHlsPlaylist)
 
 TEST_F (PlaylistParserTest, testTimer_parsingPlsPlaylist)
 
 TEST_F (PlaylistParserTest, testTimer_notParsingCertainPlaylistTypes)
 
 TEST_F (PlaylistParserTest, testTimer_parsingLiveStreamPlaylist)
 
static void verifyGetAbsoluteURLResult (std::string baseURL, std::string relativePath, const std::string &expected)
 
 TEST (PlaylistUtilsTest, test_getAbsoluteURLFromAbsolutePath)
 

Variables

static const std::string DECRYPTED_STRING = "HelloWorld!\n"
 Excepted decrypted content. More...
 
static const ByteVector AES_ENCRYPTED_CONTENT
 HelloWorld!
encrypted with below key and iv. More...
 
static const std::string HEX_IV = "0x41414141414141414141414141414141"
 Test initialization vector: AAAAAAAAAAAAAAAA. More...
 
static const auto AES_ENCRYPTION_INFO
 AES-128 EncryptionInfo with above key and iv. More...
 
static const std::chrono::milliseconds WAIT_FOR_READ_TIMEOUT {1000}
 A timeout for the attachment reader. More...
 
static const ByteVector VALID_ID3_TAG {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 1}
 An valid ID3 tag with tag size 11 (header + 1). More...
 
static const auto noEncryption = EncryptionInfo()
 Default encryption info (EncryptionInfo::Method::NONE). More...
 
static const ByteRange defaultByteRange {0, 0}
 Default byte range. More...
 
static const std::string EXT_M3U_HEADER = "#EXTM3U\n"
 Header for HLS playlist. More...
 
static const std::string MEDIA_URL = "https://www.amazon.com/audio.aac"
 Test media URL. More...
 
static const std::string PLAYLIST_URL = "https://www.amazon.com/playlist.m3u8"
 Test HLS playlist URL. More...
 
static const std::string MASTER_PLAYLIST_URL = "https://www.amazon.com/master-playlist.m3u8"
 Test master playlist URL. More...
 
static const auto SHORT_TIMEOUT = std::chrono::milliseconds(100)
 Short time out for when callbacks are expected not to occur. More...
 
static const std::string TEST_M3U_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u"}
 Test M3U url. More...
 
static const std::string TEST_M3U_PLAYLIST_CONTENT
 
static const size_t TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES = 2
 
static const std::vector< std::chrono::milliseconds > TEST_M3U_DURATIONS
 
static const std::vector< std::string > TEST_M3U_PLAYLIST_URLS
 
static const std::string TEST_M3U_RELATIVE_PLAYLIST_URL {"http://sanjayisthecoolest.com/sampleRelativeUrls.m3u"}
 Test M3U url with relative urls within. More...
 
static const std::string TEST_M3U_RELATIVE_PLAYLIST_CONTENT
 
static const size_t TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES = 2
 
static const std::vector< std::string > TEST_M3U_RELATIVE_PLAYLIST_URLS
 
static const std::string TEST_HLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u8"}
 A test playlist in HLS format. More...
 
static const std::string TEST_HLS_PLAYLIST_CONTENT
 
static const size_t TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES = 15
 
static const std::vector< std::string > TEST_HLS_PLAYLIST_URLS
 
static const std::vector< std::chrono::milliseconds > TEST_HLS_DURATIONS
 
static const std::string TEST_PLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample3.pls"}
 A test playlist in PLS format. More...
 
static const std::string TEST_PLS_CONTENT
 
static const size_t TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES = 2
 
static const std::vector< std::string > TEST_PLS_PLAYLIST_URLS
 
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_URL {"http://sanjayisthecoolest.com/liveStream.m3u8"}
 A test playlist in HLS format. More...
 
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_1
 
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_2
 
static const size_t TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES = 5
 
static const std::vector< std::string > TEST_HLS_LIVE_STREAM_PLAYLIST_URLS
 
static const std::vector< std::chrono::milliseconds > TEST_HLS_LIVE_STREAM_DURATIONS
 
static const size_t NUM_PARSES_EXPECTED_WHEN_NO_PARSING = 1
 
static const std::string TEST_MEDIA_URL = "https://sanjay.com/some_media.mp3"
 
static const std::unordered_map< std::string, std::string > urlsToContentTypes
 
static std::unordered_map< std::string, std::string > urlsToContent
 

Typedef Documentation

◆ ByteVector

using alexaClientSDK::playlistParser::test::ByteVector = typedef std::vector<unsigned char>

Alias for bytes.

Function Documentation

◆ KEY()

static const ByteVector alexaClientSDK::playlistParser::test::KEY ( 16  ,
0x61   
)
static

Test key: aaaaaaaaaaaaaaaa.

◆ matchEncryptionInfo()

void alexaClientSDK::playlistParser::test::matchEncryptionInfo ( const EncryptionInfo lhs,
const EncryptionInfo rhs 
)

Helper method to assert that encryption info match.

Parameters
lhsExpected encryption info.
rhsActual encryption info.

◆ TEST() [1/24]

alexaClientSDK::playlistParser::test::TEST ( PlaylistUtilsTest  ,
test_getAbsoluteURLFromAbsolutePath   
)

◆ TEST() [2/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyNoMethod   
)

◆ TEST() [3/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyMethodNone   
)

◆ TEST() [4/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyMissingKeyURL   
)

◆ TEST() [5/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyUnknownMethod   
)

◆ TEST() [6/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyURLClosingQuote   
)

◆ TEST() [7/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyValidURL   
)

◆ TEST() [8/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyValidInitVector   
)

◆ TEST() [9/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseMediaSequence   
)

◆ TEST() [10/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseMediaSequenceNoSpace   
)

◆ TEST() [11/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseEmptyMediaSequence   
)

◆ TEST() [12/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseManySpacesMediaSequence   
)

◆ TEST() [13/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseInvalidMediaSequence   
)

◆ TEST() [14/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseKeyEncryptionInfo   
)

◆ TEST() [15/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseByteRange   
)

◆ TEST() [16/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseByteRangeMissingColon   
)

◆ TEST() [17/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseByteRangeMissingAt   
)

◆ TEST() [18/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseByteRangeNonDecimal   
)

◆ TEST() [19/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_hLSParseByteRange   
)

◆ TEST() [20/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseMAPMissingURL   
)

◆ TEST() [21/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseMAPValidURL   
)

◆ TEST() [22/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_parseMAPValidByteRange   
)

◆ TEST() [23/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_hLSParseMAP   
)

◆ TEST() [24/24]

alexaClientSDK::playlistParser::test::TEST ( M3UParserTest  ,
test_masterPlaylist   
)

◆ TEST_F() [1/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_unsupportedEncryption   
)

◆ TEST_F() [2/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_initializeFailed   
)

Tests initialize failure due to an empty playlist url.

◆ TEST_F() [3/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
test_emptyUrl   
)

Tests parsing of an empty playlist. Calls parsePlaylist and expects it returns false.

◆ TEST_F() [4/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_invalidKeyEncryption   
)

Test key: aaaaaaaaaaaaaaa. Length is invalid.

◆ TEST_F() [5/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_initializeOk   
)

Tests successful initialization with non-empty url.

◆ TEST_F() [6/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
test_nullObserver   
)

Tests passing a nullptr for the observer.

◆ TEST_F() [7/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_invalidIVEncryption   
)

Test initialization vector: AAAAAAAAAAAAAAA. Length is invalid.

AES-128 EncryptionInfo with KEY key and INVALID_IV iv.

◆ TEST_F() [8/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parsingPlaylist   
)

Tests parsing of a simple M3U playlist.

◆ TEST_F() [9/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_validID3Tag   
)

◆ TEST_F() [10/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_parsingPlaylist   
)

Tests parsing of a simple M3U playlist. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [11/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parsingHlsPlaylist   
)

Tests parsing of an extended M3U/HLS playlist.

◆ TEST_F() [12/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_aESDecryption   
)

◆ TEST_F() [13/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parsingPlsPlaylist   
)

Tests parsing of a PLS playlist.

◆ TEST_F() [14/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_validID3TagWithOffset   
)

◆ TEST_F() [15/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parsingRelativePlaylist   
)

Tests parsing of a simple M3U playlist with relative urls.

◆ TEST_F() [16/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_parsingRelativePlaylist   
)

Tests parsing of a simple M3U playlist with relative urls. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [17/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_convertIVNullByteArray   
)

◆ TEST_F() [18/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_convertIVIncorrectLength   
)

◆ TEST_F() [19/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parsingLiveStreamPlaylist   
)

Tests parsing of a live stream HLS playlist.

◆ TEST_F() [20/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_twoValidID3Tag   
)

◆ TEST_F() [21/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parseMediaUrl   
)

Test parsing a media url. We expect the media to be the unique url.

◆ TEST_F() [22/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_convertIVNotHex   
)

◆ TEST_F() [23/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_parsingHlsPlaylist   
)

Tests parsing of an extended M3U/HLS playlist. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [24/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_parseInvalidUrl   
)

Test parsing a invalid url.

◆ TEST_F() [25/44]

alexaClientSDK::playlistParser::test::TEST_F ( ContentDecrypterTest  ,
test_convertIV   
)

◆ TEST_F() [26/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_invalidID3Tag   
)

◆ TEST_F() [27/44]

alexaClientSDK::playlistParser::test::TEST_F ( IterativePlaylistParserTest  ,
test_nextFailsAfterAbort   
)

Test calling next() after abort parsing.

◆ TEST_F() [28/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_parsingPlsPlaylist   
)

Tests parsing of a PLS playlist. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [29/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_partialID3Tag   
)

◆ TEST_F() [30/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_notParsingCertainPlaylistTypes   
)

Tests that the playlist parser skips parsing of unwanted playlist types. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [31/44]

alexaClientSDK::playlistParser::test::TEST_F ( PlaylistParserTest  ,
testTimer_parsingLiveStreamPlaylist   
)

Tests parsing of a live stream HLS playlist. Calls parsePlaylist and expects that the result of the parsing is successful.

◆ TEST_F() [32/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentValidID3Tag   
)

◆ TEST_F() [33/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentTwoValidID3Tag   
)

◆ TEST_F() [34/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentPartialID3Tag   
)

◆ TEST_F() [35/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentCompleteID3Tag   
)

◆ TEST_F() [36/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagAcrossTwoWrites   
)

◆ TEST_F() [37/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3Tag9MatchingAcrossTwoWrites   
)

◆ TEST_F() [38/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagAcrossFullHeaderTwoWrites   
)

◆ TEST_F() [39/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentInvalidID3TagAcrossTwoWrites   
)

◆ TEST_F() [40/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagRemove10BytesAcrossTwoWrites   
)

◆ TEST_F() [41/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagBoundary1AcrossTwoWrites   
)

◆ TEST_F() [42/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagBoundary2AcrossTwoWrites   
)

◆ TEST_F() [43/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagBoundary3AcrossTwoWrites   
)

◆ TEST_F() [44/44]

alexaClientSDK::playlistParser::test::TEST_F ( Id3TagsRemoverTest  ,
test_attachmentID3TagRemoveTagAcrossTwoBoundaries   
)

◆ verifyGetAbsoluteURLResult()

static void alexaClientSDK::playlistParser::test::verifyGetAbsoluteURLResult ( std::string  baseURL,
std::string  relativePath,
const std::string &  expected 
)
static

Variable Documentation

◆ AES_ENCRYPTED_CONTENT

const ByteVector alexaClientSDK::playlistParser::test::AES_ENCRYPTED_CONTENT
static
Initial value:
=
{0xe8, 0xc2, 0x17, 0xa0, 0xa6, 0x95, 0x88, 0x39, 0xa3, 0x05, 0xa4, 0xfa, 0x42, 0x91, 0x52, 0x19}

HelloWorld!
encrypted with below key and iv.

◆ AES_ENCRYPTION_INFO

const auto alexaClientSDK::playlistParser::test::AES_ENCRYPTION_INFO
static
Initial value:
=
EncryptionInfo(EncryptionInfo::Method::AES_128, "https://wwww.amazon.com/key.txt", HEX_IV)
static const std::string HEX_IV
Test initialization vector: AAAAAAAAAAAAAAAA.
Definition: ContentDecrypterTest.cpp:42

AES-128 EncryptionInfo with above key and iv.

◆ DECRYPTED_STRING

const std::string alexaClientSDK::playlistParser::test::DECRYPTED_STRING = "HelloWorld!\n"
static

Excepted decrypted content.

◆ defaultByteRange

const ByteRange alexaClientSDK::playlistParser::test::defaultByteRange {0, 0}
static

Default byte range.

◆ EXT_M3U_HEADER

const std::string alexaClientSDK::playlistParser::test::EXT_M3U_HEADER = "#EXTM3U\n"
static

Header for HLS playlist.

◆ HEX_IV

const std::string alexaClientSDK::playlistParser::test::HEX_IV = "0x41414141414141414141414141414141"
static

Test initialization vector: AAAAAAAAAAAAAAAA.

◆ MASTER_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::MASTER_PLAYLIST_URL = "https://www.amazon.com/master-playlist.m3u8"
static

Test master playlist URL.

◆ MEDIA_URL

const std::string alexaClientSDK::playlistParser::test::MEDIA_URL = "https://www.amazon.com/audio.aac"
static

Test media URL.

◆ noEncryption

const auto alexaClientSDK::playlistParser::test::noEncryption = EncryptionInfo()
static

Default encryption info (EncryptionInfo::Method::NONE).

◆ NUM_PARSES_EXPECTED_WHEN_NO_PARSING

const size_t alexaClientSDK::playlistParser::test::NUM_PARSES_EXPECTED_WHEN_NO_PARSING = 1
static

◆ PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::PLAYLIST_URL = "https://www.amazon.com/playlist.m3u8"
static

Test HLS playlist URL.

◆ SHORT_TIMEOUT

const auto alexaClientSDK::playlistParser::test::SHORT_TIMEOUT = std::chrono::milliseconds(100)
static

Short time out for when callbacks are expected not to occur.

◆ TEST_HLS_DURATIONS

const std::vector<std::chrono::milliseconds> alexaClientSDK::playlistParser::test::TEST_HLS_DURATIONS
static
Initial value:
= {std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000},
std::chrono::milliseconds{10340},
std::chrono::milliseconds{10344},
std::chrono::milliseconds{10344},
std::chrono::milliseconds{10002},
std::chrono::milliseconds{10002},
std::chrono::milliseconds{10002},
std::chrono::milliseconds{-1},
std::chrono::milliseconds{-1},
std::chrono::milliseconds{-1},
std::chrono::milliseconds{-1},
std::chrono::milliseconds{-1},
std::chrono::milliseconds{123000}}

◆ TEST_HLS_LIVE_STREAM_DURATIONS

const std::vector<std::chrono::milliseconds> alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_DURATIONS
static
Initial value:
= {std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000},
std::chrono::milliseconds{10000}}

◆ TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_1

const std::string alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_1
static
Initial value:
=
"#EXTM3U\n"
"#EXT-X-TARGETDURATION:10\n"
"#EXT-X-MEDIA-SEQUENCE:9684358\n"
"#EXTINF:10,RADIO\n"
"http://76.74.255.139/bismarck/live/bismarck.mov_9684358.aac\n"
"#EXTINF:10.0,RADIO\n"
"http://76.74.255.139/bismarck/live/bismarck.mov_9684359.aac\n"
"#EXTINF:10,RADIO\n"
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac\n"

◆ TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_2

const std::string alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_2
static
Initial value:
=
"#EXTM3U\n"
"#EXT-X-TARGETDURATION:10\n"
"#EXT-X-MEDIA-SEQUENCE:9684360\n"
"#EXTINF:10,RADIO\n"
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac\n"
"#EXTINF:10,RADIO\n"
"http://sanjay.com/chunk.mp3\n"
"#EXTINF:10,RADIO\n"
"http://sanjay.com/anotherChunk.mp3\n"
"#EXT-X-ENDLIST\n"

◆ TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES

const size_t alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_PLAYLIST_EXPECTED_PARSES = 5
static

◆ TEST_HLS_LIVE_STREAM_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_PLAYLIST_URL {"http://sanjayisthecoolest.com/liveStream.m3u8"}
static

A test playlist in HLS format.

◆ TEST_HLS_LIVE_STREAM_PLAYLIST_URLS

const std::vector<std::string> alexaClientSDK::playlistParser::test::TEST_HLS_LIVE_STREAM_PLAYLIST_URLS
static
Initial value:
= {
"http://76.74.255.139/bismarck/live/bismarck.mov_9684358.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684359.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://sanjay.com/chunk.mp3",
"http://sanjay.com/anotherChunk.mp3"}

◆ TEST_HLS_PLAYLIST_CONTENT

const std::string alexaClientSDK::playlistParser::test::TEST_HLS_PLAYLIST_CONTENT
static

◆ TEST_HLS_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::TEST_HLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u8"}
static

A test playlist in HLS format.

◆ TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES

const size_t alexaClientSDK::playlistParser::test::TEST_HLS_PLAYLIST_URL_EXPECTED_PARSES = 15
static

◆ TEST_HLS_PLAYLIST_URLS

const std::vector<std::string> alexaClientSDK::playlistParser::test::TEST_HLS_PLAYLIST_URLS
static
Initial value:
= {
"http://76.74.255.139/bismarck/live/bismarck.mov_9684358.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684359.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac",
"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac"}

◆ TEST_M3U_DURATIONS

const std::vector<std::chrono::milliseconds> alexaClientSDK::playlistParser::test::TEST_M3U_DURATIONS
static
Initial value:
= {std::chrono::milliseconds{-1},
std::chrono::milliseconds{-1}}

◆ TEST_M3U_PLAYLIST_CONTENT

const std::string alexaClientSDK::playlistParser::test::TEST_M3U_PLAYLIST_CONTENT
static
Initial value:
=
"http://stream.radiotime.com/sample.mp3\n"
"http://live-mp3-128.kexp.org\n"

◆ TEST_M3U_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::TEST_M3U_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample.m3u"}
static

Test M3U url.

◆ TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES

const size_t alexaClientSDK::playlistParser::test::TEST_M3U_PLAYLIST_URL_EXPECTED_PARSES = 2
static

◆ TEST_M3U_PLAYLIST_URLS

const std::vector<std::string> alexaClientSDK::playlistParser::test::TEST_M3U_PLAYLIST_URLS
static
Initial value:
= {"http://stream.radiotime.com/sample.mp3",
"http://live-mp3-128.kexp.org"}

◆ TEST_M3U_RELATIVE_PLAYLIST_CONTENT

const std::string alexaClientSDK::playlistParser::test::TEST_M3U_RELATIVE_PLAYLIST_CONTENT
static
Initial value:
=
"../test.mp3\n"
"test2.aac\n"

◆ TEST_M3U_RELATIVE_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::TEST_M3U_RELATIVE_PLAYLIST_URL {"http://sanjayisthecoolest.com/sampleRelativeUrls.m3u"}
static

Test M3U url with relative urls within.

◆ TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES

const size_t alexaClientSDK::playlistParser::test::TEST_M3U_RELATIVE_PLAYLIST_URL_EXPECTED_PARSES = 2
static

◆ TEST_M3U_RELATIVE_PLAYLIST_URLS

const std::vector<std::string> alexaClientSDK::playlistParser::test::TEST_M3U_RELATIVE_PLAYLIST_URLS
static
Initial value:
= {"http://sanjayisthecoolest.com/../test.mp3",
"http://sanjayisthecoolest.com/test2.aac"}

◆ TEST_MEDIA_URL

const std::string alexaClientSDK::playlistParser::test::TEST_MEDIA_URL = "https://sanjay.com/some_media.mp3"
static

◆ TEST_PLS_CONTENT

const std::string alexaClientSDK::playlistParser::test::TEST_PLS_CONTENT
static
Initial value:
=
"[playlist]\n"
"NumberOfEntries=2\n"
"File1=http://stream.radiotime.com/sample.mp3\n"
"Length1=-1\n"
"File2=http://live-mp3-128.kexp.org\n"
"Length2=-1\n"

◆ TEST_PLS_PLAYLIST_URL

const std::string alexaClientSDK::playlistParser::test::TEST_PLS_PLAYLIST_URL {"http://sanjayisthecoolest.com/sample3.pls"}
static

A test playlist in PLS format.

◆ TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES

const size_t alexaClientSDK::playlistParser::test::TEST_PLS_PLAYLIST_URL_EXPECTED_PARSES = 2
static

◆ TEST_PLS_PLAYLIST_URLS

const std::vector<std::string> alexaClientSDK::playlistParser::test::TEST_PLS_PLAYLIST_URLS
static
Initial value:
= {"http://stream.radiotime.com/sample.mp3",
"http://live-mp3-128.kexp.org"}

◆ urlsToContent

std::unordered_map<std::string, std::string> alexaClientSDK::playlistParser::test::urlsToContent
static
Initial value:
{
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_URL
A test playlist in HLS format.
Definition: MockContentFetcher.h:151
static const std::string TEST_HLS_PLAYLIST_URL
A test playlist in HLS format.
Definition: MockContentFetcher.h:61
static const std::string TEST_PLS_PLAYLIST_URL
A test playlist in PLS format.
Definition: MockContentFetcher.h:135
static const std::string TEST_PLS_CONTENT
Definition: MockContentFetcher.h:137
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_CONTENT_1
Definition: MockContentFetcher.h:153
static const std::string TEST_M3U_RELATIVE_PLAYLIST_CONTENT
Definition: MockContentFetcher.h:51
static const std::string TEST_HLS_PLAYLIST_CONTENT
Definition: MockContentFetcher.h:63
static const std::string TEST_M3U_PLAYLIST_URL
Test M3U url.
Definition: MockContentFetcher.h:34
static const std::string TEST_M3U_PLAYLIST_CONTENT
Definition: MockContentFetcher.h:36
static const std::string TEST_M3U_RELATIVE_PLAYLIST_URL
Test M3U url with relative urls within.
Definition: MockContentFetcher.h:49

◆ urlsToContentTypes

const std::unordered_map<std::string, std::string> alexaClientSDK::playlistParser::test::urlsToContentTypes
static
Initial value:
{
{TEST_M3U_PLAYLIST_URL, "audio/mpegurl"},
{TEST_M3U_RELATIVE_PLAYLIST_URL, "audio/mpegurl"},
{TEST_HLS_PLAYLIST_URL, "application/vnd.apple.mpegurl"},
{TEST_PLS_PLAYLIST_URL, "audio/x-scpls"},
{TEST_MEDIA_URL, "audio/mpeg"},
{"http://stream.radiotime.com/sample.mp3", "audio/mpeg"},
{"http://live-mp3-128.kexp.org", "audio/mpeg"},
{"http://76.74.255.139/bismarck/live/bismarck.mov_9684358.aac", "audio/mpeg"},
{"http://76.74.255.139/bismarck/live/bismarck.mov_9684359.aac", "audio/mpeg"},
{"http://76.74.255.139/bismarck/live/bismarck.mov_9684360.aac", "audio/mpeg"},
{"http://stream.radiotime.com/sample.mp3", "audio/mpeg"},
{"http://live-mp3-128.kexp.org", "audio/mpeg"},
{"http://sanjayisthecoolest.com/../test.mp3", "audio/mpeg"},
{"http://sanjayisthecoolest.com/test2.aac", "audio/mpeg"},
{"http://sanjay.com/chunk.mp3", "audio/mpeg"},
{"http://sanjay.com/anotherChunk.mp3", "audio/mpeg"}}
static const std::string TEST_HLS_LIVE_STREAM_PLAYLIST_URL
A test playlist in HLS format.
Definition: MockContentFetcher.h:151
static const std::string TEST_HLS_PLAYLIST_URL
A test playlist in HLS format.
Definition: MockContentFetcher.h:61
static const std::string TEST_PLS_PLAYLIST_URL
A test playlist in PLS format.
Definition: MockContentFetcher.h:135
static const std::string TEST_M3U_PLAYLIST_URL
Test M3U url.
Definition: MockContentFetcher.h:34
static const std::string TEST_M3U_RELATIVE_PLAYLIST_URL
Test M3U url with relative urls within.
Definition: MockContentFetcher.h:49
static const std::string TEST_MEDIA_URL
Definition: MockContentFetcher.h:193

◆ VALID_ID3_TAG

const ByteVector alexaClientSDK::playlistParser::test::VALID_ID3_TAG {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 1}
static

An valid ID3 tag with tag size 11 (header + 1).

◆ WAIT_FOR_READ_TIMEOUT

const std::chrono::milliseconds alexaClientSDK::playlistParser::test::WAIT_FOR_READ_TIMEOUT {1000}
static

A timeout for the attachment reader.

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0