Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
shell_unittests.cc File Reference
#include <algorithm>
#include <chrono>
#include <ctime>
#include <future>
#include <memory>
#include <strstream>
#include <thread>
#include <utility>
#include <vector>
#include "assets/asset_resolver.h"
#include "assets/directory_asset_bundle.h"
#include "common/graphics/persistent_cache.h"
#include "flutter/flow/layers/backdrop_filter_layer.h"
#include "flutter/flow/layers/clip_rect_layer.h"
#include "flutter/flow/layers/display_list_layer.h"
#include "flutter/flow/layers/layer_raster_cache_item.h"
#include "flutter/flow/layers/platform_view_layer.h"
#include "flutter/flow/layers/transform_layer.h"
#include "flutter/fml/backtrace.h"
#include "flutter/fml/command_line.h"
#include "flutter/fml/make_copyable.h"
#include "flutter/fml/message_loop.h"
#include "flutter/fml/synchronization/count_down_latch.h"
#include "flutter/fml/synchronization/waitable_event.h"
#include "flutter/runtime/dart_vm.h"
#include "flutter/shell/common/platform_view.h"
#include "flutter/shell/common/rasterizer.h"
#include "flutter/shell/common/shell_test.h"
#include "flutter/shell/common/shell_test_external_view_embedder.h"
#include "flutter/shell/common/shell_test_platform_view.h"
#include "flutter/shell/common/switches.h"
#include "flutter/shell/common/thread_host.h"
#include "flutter/shell/common/vsync_waiter_fallback.h"
#include "flutter/shell/common/vsync_waiters_test.h"
#include "flutter/shell/version/version.h"
#include "flutter/testing/mock_canvas.h"
#include "flutter/testing/testing.h"
#include "gmock/gmock.h"
#include "impeller/core/runtime_types.h"
#include "third_party/rapidjson/include/rapidjson/writer.h"
#include "third_party/skia/include/codec/SkCodecAnimation.h"
#include "third_party/tonic/converter/dart_converter.h"

Go to the source code of this file.

Classes

class  flutter::testing::TestAssetResolver
 
class  flutter::testing::ThreadCheckingAssetResolver
 
class  flutter::testing::MockTexture
 
class  flutter::testing::SinglePixelImageGenerator
 An image generator that always creates a 1x1 single-frame green image. More...
 

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Macros

#define FML_USED_ON_EMBEDDER
 

Functions

static bool flutter::testing::ValidateShell (Shell *shell)
 
static bool flutter::testing::RasterizerIsTornDown (Shell *shell)
 
static void flutter::testing::ValidateDestroyPlatformView (Shell *shell)
 
static std::string flutter::testing::CreateFlagsString (std::vector< const char * > &flags)
 
static void flutter::testing::TestDartVmFlags (std::vector< const char * > &flags)
 
static void flutter::testing::PostSync (const fml::RefPtr< fml::TaskRunner > &task_runner, const fml::closure &task)
 
static sk_sp< DisplayList > flutter::testing::MakeSizedDisplayList (int width, int height)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithInvalidThreads)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithDifferentThreads)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithSingleThread)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithSingleThreadWhichIsTheCallingThread)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithMultipleThreadButCallingThreadAsPlatformThread)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithDisabledGpu)
 
 flutter::testing::TEST_F (ShellTest, InitializeWithGPUAndPlatformThreadsTheSame)
 
 flutter::testing::TEST_F (ShellTest, FixturesAreFunctional)
 
 flutter::testing::TEST_F (ShellTest, SecondaryIsolateBindingsAreSetupViaShellSettings)
 
 flutter::testing::TEST_F (ShellTest, LastEntrypoint)
 
 flutter::testing::TEST_F (ShellTest, LastEntrypointArgs)
 
 flutter::testing::TEST_F (ShellTest, DisallowedDartVMFlag)
 
 flutter::testing::TEST_F (ShellTest, AllowedDartVMFlag)
 
 flutter::testing::TEST_F (ShellTest, NoNeedToReportTimingsByDefault)
 
 flutter::testing::TEST_F (ShellTest, NeedsReportTimingsIsSetWithCallback)
 
static void flutter::testing::CheckFrameTimings (const std::vector< FrameTiming > &timings, fml::TimePoint start, fml::TimePoint finish)
 
 flutter::testing::TEST_F (ShellTest, ReportTimingsIsCalled)
 
 flutter::testing::TEST_F (ShellTest, FrameRasterizedCallbackIsCalled)
 
 flutter::testing::TEST_F (ShellTest, ExternalEmbedderNoThreadMerger)
 
 flutter::testing::TEST_F (ShellTest, PushBackdropFilterToVisitedPlatformViews)
 
 flutter::testing::TEST_F (ShellTest, ExternalEmbedderEndFrameIsCalledWhenPostPrerollResultIsResubmit)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyDisablesThreadMerger)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyAfterMergingThreads)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyWhenThreadsAreMerging)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyWithThreadMergerWhileThreadsAreUnmerged)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyWithoutRasterThreadMerger)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewDestroyWithStaticThreadMerging)
 
 flutter::testing::TEST_F (ShellTest, GetUsedThisFrameShouldBeSetBeforeEndFrame)
 
 flutter::testing::TEST_F (ShellTest, DISABLED_SkipAndSubmitFrame)
 
 flutter::testing::TEST (SettingsTest, FrameTimingSetsAndGetsProperly)
 
 flutter::testing::TEST_F (ShellTest, ReportTimingsIsCalledImmediatelyAfterTheFirstFrame)
 
 flutter::testing::TEST_F (ShellTest, WaitForFirstFrame)
 
 flutter::testing::TEST_F (ShellTest, WaitForFirstFrameZeroSizeFrame)
 
 flutter::testing::TEST_F (ShellTest, WaitForFirstFrameTimeout)
 
 flutter::testing::TEST_F (ShellTest, WaitForFirstFrameMultiple)
 
 flutter::testing::TEST_F (ShellTest, WaitForFirstFrameInlined)
 
static size_t flutter::testing::GetRasterizerResourceCacheBytesSync (const Shell &shell)
 
 flutter::testing::TEST_F (ShellTest, MultipleFluttersSetResourceCacheBytes)
 
 flutter::testing::TEST_F (ShellTest, SetResourceCacheSize)
 
 flutter::testing::TEST_F (ShellTest, SetResourceCacheSizeEarly)
 
 flutter::testing::TEST_F (ShellTest, SetResourceCacheSizeNotifiesDart)
 
 flutter::testing::TEST_F (ShellTest, CanCreateImagefromDecompressedBytes)
 
 flutter::testing::TEST_F (ShellTest, TextureFrameMarkedAvailableAndUnregister)
 
 flutter::testing::TEST_F (ShellTest, IsolateCanAccessPersistentIsolateData)
 
 flutter::testing::TEST_F (ShellTest, CanScheduleFrameFromPlatform)
 
 flutter::testing::TEST_F (ShellTest, SecondaryVsyncCallbackShouldBeCalledAfterVsyncCallback)
 
static void flutter::testing::LogSkData (const sk_sp< SkData > &data, const char *title)
 
 flutter::testing::TEST_F (ShellTest, Screenshot)
 
 flutter::testing::TEST_F (ShellTest, LocaltimesMatch)
 
 flutter::testing::TEST_F (ShellTest, CanRegisterImageDecoders)
 
 flutter::testing::TEST_F (ShellTest, OnServiceProtocolGetSkSLsWorks)
 
 flutter::testing::TEST_F (ShellTest, RasterizerScreenshot)
 
 flutter::testing::TEST_F (ShellTest, RasterizerMakeRasterSnapshot)
 
 flutter::testing::TEST_F (ShellTest, OnServiceProtocolEstimateRasterCacheMemoryWorks)
 
 flutter::testing::TEST_F (ShellTest, OnServiceProtocolRenderFrameWithRasterStatsWorks)
 
 flutter::testing::TEST_F (ShellTest, DISABLED_DiscardLayerTreeOnResize)
 
 flutter::testing::TEST_F (ShellTest, DISABLED_DiscardResubmittedLayerTreeOnResize)
 
 flutter::testing::TEST_F (ShellTest, IgnoresInvalidMetrics)
 
 flutter::testing::TEST_F (ShellTest, IgnoresMetricsUpdateToInvalidView)
 
 flutter::testing::TEST_F (ShellTest, OnServiceProtocolSetAssetBundlePathWorks)
 
 flutter::testing::TEST_F (ShellTest, EngineRootIsolateLaunchesDontTakeVMDataSettings)
 
 flutter::testing::TEST_F (ShellTest, AssetManagerSingle)
 
 flutter::testing::TEST_F (ShellTest, AssetManagerMulti)
 
 flutter::testing::TEST_F (ShellTest, Spawn)
 
 flutter::testing::TEST_F (ShellTest, SpawnWithDartEntrypointArgs)
 
 flutter::testing::TEST_F (ShellTest, IOManagerIsSharedBetweenParentAndSpawnedShell)
 
 flutter::testing::TEST_F (ShellTest, IOManagerInSpawnedShellIsNotNullAfterParentShellDestroyed)
 
 flutter::testing::TEST_F (ShellTest, ImageGeneratorRegistryNotNullAfterParentShellDestroyed)
 
 flutter::testing::TEST_F (ShellTest, UpdateAssetResolverByTypeReplaces)
 
 flutter::testing::TEST_F (ShellTest, UpdateAssetResolverByTypeAppends)
 
 flutter::testing::TEST_F (ShellTest, UpdateAssetResolverByTypeNull)
 
 flutter::testing::TEST_F (ShellTest, UpdateAssetResolverByTypeDoesNotReplaceMismatchType)
 
 flutter::testing::TEST_F (ShellTest, CanCreateShellsWithGLBackend)
 
 flutter::testing::TEST_F (ShellTest, CanCreateShellsWithVulkanBackend)
 
 flutter::testing::TEST_F (ShellTest, CanCreateShellsWithMetalBackend)
 
 flutter::testing::TEST_F (ShellTest, UserTagSetOnStartup)
 
 flutter::testing::TEST_F (ShellTest, PrefetchDefaultFontManager)
 
 flutter::testing::TEST_F (ShellTest, OnPlatformViewCreatedWhenUIThreadIsBusy)
 
 flutter::testing::TEST_F (ShellTest, UIWorkAfterOnPlatformViewDestroyed)
 
 flutter::testing::TEST_F (ShellTest, UsesPlatformMessageHandler)
 
 flutter::testing::TEST_F (ShellTest, SpawnWorksWithOnError)
 
 flutter::testing::TEST_F (ShellTest, ImmutableBufferLoadsAssetOnBackgroundThread)
 
 flutter::testing::TEST_F (ShellTest, PictureToImageSync)
 
 flutter::testing::TEST_F (ShellTest, PictureToImageSyncImpellerNoSurface)
 
 flutter::testing::TEST_F (ShellTest, PluginUtilitiesCallbackHandleErrorHandling)
 
 flutter::testing::TEST_F (ShellTest, NotifyIdleRejectsPastAndNearFuture)
 
 flutter::testing::TEST_F (ShellTest, NotifyIdleNotCalledInLatencyMode)
 
 flutter::testing::TEST_F (ShellTest, NotifyDestroyed)
 
 flutter::testing::TEST_F (ShellTest, PrintsErrorWhenPlatformMessageSentFromWrongThread)
 
 flutter::testing::TEST_F (ShellTest, DiesIfSoftwareRenderingAndImpellerAreEnabledDeathTest)
 
static void flutter::testing::ParseViewIdsCallback (const Dart_NativeArguments &args, bool *hasImplicitView, std::vector< int64_t > *viewIds)
 
 flutter::testing::TEST_F (ShellTest, ShellStartsWithImplicitView)
 
 flutter::testing::TEST_F (ShellTest, ShellCanAddViewOrRemoveView)
 
 flutter::testing::TEST_F (ShellTest, ShellCannotAddDuplicateViewId)
 
 flutter::testing::TEST_F (ShellTest, ShellCannotRemoveNonexistentId)
 
static void flutter::testing::ParseViewWidthsCallback (const Dart_NativeArguments &args, std::map< int64_t, int64_t > *viewWidths)
 
 flutter::testing::TEST_F (ShellTest, ShellFlushesPlatformStatesByMain)
 
 flutter::testing::TEST_F (ShellTest, CanRemoveViewBeforeLaunchingIsolate)
 
 flutter::testing::TEST_F (ShellTest, IgnoresBadAddViewsBeforeLaunchingIsolate)
 
 flutter::testing::TEST_F (ShellTest, RuntimeStageBackendDefaultsToSkSLWithoutImpeller)
 
 flutter::testing::TEST_F (ShellTest, WillLogWarningWhenImpellerIsOptedOut)
 

Macro Definition Documentation

◆ FML_USED_ON_EMBEDDER

#define FML_USED_ON_EMBEDDER

Definition at line 5 of file shell_unittests.cc.