Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
TestScreenshot.cpp File Reference
#include "FileItemList.h"
#include "ServiceBroker.h"
#include "filesystem/Directory.h"
#include "filesystem/File.h"
#include "filesystem/SpecialProtocol.h"
#include "jobs/JobManager.h"
#include "rendering/capture/CapturePixels.h"
#include "rendering/capture/CaptureService.h"
#include "rendering/capture/CaptureTypes.h"
#include "settings/Settings.h"
#include "test/TestUtils.h"
#include "utils/Screenshot.h"
#include "utils/URIUtils.h"
#include <chrono>
#include <future>
#include <memory>
#include <optional>
#include <thread>
#include <vector>
#include <gtest/gtest.h>

Classes

class  TestScreenshotDeletion
 Exercises deletion against a real screenshot folder. More...
 
class  TestScreenshotTaking
 Takes screenshots with the test standing in for the render loop. More...
 

Typedefs

using Error = CScreenShot::ScreenshotError
 

Functions

 TEST_F (TestScreenshotDeletion, ClearsEveryScreenshotAndSaysHowMany)
 
 TEST_F (TestScreenshotDeletion, ClearsAScreenshotTheFolderHides)
 
 TEST_F (TestScreenshotDeletion, LeavesWhatIsNotAScreenshotAlone)
 
 TEST_F (TestScreenshotDeletion, ClearingAnEmptyFolderIsNotAFailure)
 
 TEST_F (TestScreenshotDeletion, DeletesTheOneNamed)
 
 TEST_F (TestScreenshotDeletion, AcceptsThePathTakeScreenshotAnswered)
 
 TEST_F (TestScreenshotDeletion, RefusesANameThatWouldLeaveTheFolder)
 
 TEST_F (TestScreenshotDeletion, RefusesANameThatIsNotAPng)
 
 TEST_F (TestScreenshotDeletion, ReportsAScreenshotThatIsNotThere)
 
 TEST_F (TestScreenshotDeletion, ClearingSaysWhenAScreenshotCouldNotBeDeleted)
 
 TEST_F (TestScreenshotTaking, WritesTheFrameAndAnswersItsPath)
 
 TEST_F (TestScreenshotTaking, BothWithNoVideoFrameFailsAtOnceAndLeavesNoFile)
 
 TEST_F (TestScreenshotTaking, AFailedScreenshotLeavesTheOneItsNameAlreadyHeld)
 
 TEST_F (TestScreenshotTaking, AFailedPairLeavesBothScreenshotsItsNameAlreadyHeld)
 
 TEST_F (TestScreenshotTaking, ANamedPairReplacesTheScreenshotsItsNameHeld)
 
 TEST_F (TestScreenshotTaking, APairDrawnOncePerEyeWritesOneVideoFrame)
 
 TEST_F (TestScreenshotTaking, ANumberItsVideoFrameStillHoldsIsNotTakenAgain)
 
 TEST_F (TestScreenshotTaking, ACallWhileOneIsInFlightAnswersThatOnesScreenshot)
 
 TEST_F (TestScreenshotTaking, NoScreenshotIsNumberedWhileAnotherMovesIntoPlace)
 
 TEST (TestScreenshotPath, OnlyAPlainPngUnderTheScreenshotFolderIsAScreenshot)
 
 TEST (TestScreenshotPath, NothingIsAScreenshotWhileNoFolderIsSet)
 

Typedef Documentation

◆ Error

Function Documentation

◆ TEST() [1/2]

TEST ( TestScreenshotPath ,
NothingIsAScreenshotWhileNoFolderIsSet  )

◆ TEST() [2/2]

TEST ( TestScreenshotPath ,
OnlyAPlainPngUnderTheScreenshotFolderIsAScreenshot  )

◆ TEST_F() [1/19]

TEST_F ( TestScreenshotDeletion ,
AcceptsThePathTakeScreenshotAnswered  )

◆ TEST_F() [2/19]

TEST_F ( TestScreenshotDeletion ,
ClearingAnEmptyFolderIsNotAFailure  )

◆ TEST_F() [3/19]

TEST_F ( TestScreenshotDeletion ,
ClearingSaysWhenAScreenshotCouldNotBeDeleted  )

◆ TEST_F() [4/19]

TEST_F ( TestScreenshotDeletion ,
ClearsAScreenshotTheFolderHides  )

◆ TEST_F() [5/19]

TEST_F ( TestScreenshotDeletion ,
ClearsEveryScreenshotAndSaysHowMany  )

◆ TEST_F() [6/19]

TEST_F ( TestScreenshotDeletion ,
DeletesTheOneNamed  )

◆ TEST_F() [7/19]

TEST_F ( TestScreenshotDeletion ,
LeavesWhatIsNotAScreenshotAlone  )

◆ TEST_F() [8/19]

TEST_F ( TestScreenshotDeletion ,
RefusesANameThatIsNotAPng  )

◆ TEST_F() [9/19]

TEST_F ( TestScreenshotDeletion ,
RefusesANameThatWouldLeaveTheFolder  )

◆ TEST_F() [10/19]

TEST_F ( TestScreenshotDeletion ,
ReportsAScreenshotThatIsNotThere  )

◆ TEST_F() [11/19]

TEST_F ( TestScreenshotTaking ,
ACallWhileOneIsInFlightAnswersThatOnesScreenshot  )

◆ TEST_F() [12/19]

TEST_F ( TestScreenshotTaking ,
AFailedPairLeavesBothScreenshotsItsNameAlreadyHeld  )

◆ TEST_F() [13/19]

TEST_F ( TestScreenshotTaking ,
AFailedScreenshotLeavesTheOneItsNameAlreadyHeld  )

◆ TEST_F() [14/19]

TEST_F ( TestScreenshotTaking ,
ANamedPairReplacesTheScreenshotsItsNameHeld  )

◆ TEST_F() [15/19]

TEST_F ( TestScreenshotTaking ,
ANumberItsVideoFrameStillHoldsIsNotTakenAgain  )

◆ TEST_F() [16/19]

TEST_F ( TestScreenshotTaking ,
APairDrawnOncePerEyeWritesOneVideoFrame  )

◆ TEST_F() [17/19]

TEST_F ( TestScreenshotTaking ,
BothWithNoVideoFrameFailsAtOnceAndLeavesNoFile  )

◆ TEST_F() [18/19]

TEST_F ( TestScreenshotTaking ,
NoScreenshotIsNumberedWhileAnotherMovesIntoPlace  )

◆ TEST_F() [19/19]

TEST_F ( TestScreenshotTaking ,
WritesTheFrameAndAnswersItsPath  )