Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions shell/common/persistent_cache_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ static void WaitForRaster(Shell* shell) {
}

TEST_F(PersistentCacheTest, CacheSkSLWorks) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
#endif // defined(WINUWP)

// Create a temp dir to store the persistent cache
fml::ScopedTemporaryDirectory dir;
PersistentCache::SetCacheDirectoryPath(dir.path());
Expand Down Expand Up @@ -204,6 +209,11 @@ static void CheckTwoSkSLsAreLoaded() {
}

TEST_F(PersistentCacheTest, CanLoadSkSLsFromAsset) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

// Avoid polluting unit tests output by hiding INFO level logging.
fml::LogSettings warning_only = {fml::LOG_WARNING};
fml::ScopedSetLogSettings scoped_set_log_settings(warning_only);
Expand Down Expand Up @@ -268,6 +278,11 @@ TEST_F(PersistentCacheTest, CanLoadSkSLsFromAsset) {
}

TEST_F(PersistentCacheTest, CanRemoveOldPersistentCache) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

fml::ScopedTemporaryDirectory base_dir;
ASSERT_TRUE(base_dir.fd().is_valid());

Expand Down Expand Up @@ -298,6 +313,11 @@ TEST_F(PersistentCacheTest, CanRemoveOldPersistentCache) {
}

TEST_F(PersistentCacheTest, CanPurgePersistentCache) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

fml::ScopedTemporaryDirectory base_dir;
ASSERT_TRUE(base_dir.fd().is_valid());
auto cache_dir = fml::CreateDirectory(
Expand Down Expand Up @@ -330,6 +350,11 @@ TEST_F(PersistentCacheTest, CanPurgePersistentCache) {
}

TEST_F(PersistentCacheTest, PurgeAllowsFutureSkSLCache) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

sk_sp<SkData> shader_key = SkData::MakeWithCString("key");
sk_sp<SkData> shader_value = SkData::MakeWithCString("value");
std::string shader_filename = PersistentCache::SkKeyToFilePath(*shader_key);
Expand Down
49 changes: 49 additions & 0 deletions shell/common/shell_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ TEST_F(ShellTest, LastEntrypoint) {
}

TEST_F(ShellTest, DisallowedDartVMFlag) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
#endif // defined(WINUWP)

// Run this test in a thread-safe manner, otherwise gtest will complain.
::testing::FLAGS_gtest_death_test_style = "threadsafe";

Expand All @@ -454,6 +459,10 @@ TEST_F(ShellTest, DisallowedDartVMFlag) {
}

TEST_F(ShellTest, AllowedDartVMFlag) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
#endif // defined(WINUWP)
std::vector<const char*> flags = {
"--enable-isolate-groups",
"--no-enable-isolate-groups",
Expand All @@ -466,6 +475,7 @@ TEST_F(ShellTest, AllowedDartVMFlag) {
flags.push_back("--enable_mirrors");
}
#endif

TestDartVmFlags(flags);
}

Expand Down Expand Up @@ -756,6 +766,10 @@ TEST_F(ShellTest,
OnPlatformViewDestroyDisablesThreadMerger
#endif
) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP. Not yet implemented";
#endif // defined(WINUWP)
auto settings = CreateSettingsForFixture();
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger;
auto end_frame_callback =
Expand Down Expand Up @@ -1336,6 +1350,11 @@ TEST_F(ShellTest, ReloadSystemFonts) {
}

TEST_F(ShellTest, WaitForFirstFrame) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires fix";
#endif // defined(WINUWP)

auto settings = CreateSettingsForFixture();
std::unique_ptr<Shell> shell = CreateShell(settings);

Expand Down Expand Up @@ -1391,6 +1410,11 @@ TEST_F(ShellTest, WaitForFirstFrameTimeout) {
}

TEST_F(ShellTest, WaitForFirstFrameMultiple) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires threading fix";
#endif // defined(WINUWP)

auto settings = CreateSettingsForFixture();
std::unique_ptr<Shell> shell = CreateShell(settings);

Expand All @@ -1415,6 +1439,11 @@ TEST_F(ShellTest, WaitForFirstFrameMultiple) {
/// Makes sure that WaitForFirstFrame works if we rendered a frame with the
/// single-thread setup.
TEST_F(ShellTest, WaitForFirstFrameInlined) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires threading fix";
#endif // defined(WINUWP)

Settings settings = CreateSettingsForFixture();
auto task_runner = CreateNewThread();
TaskRunners task_runners("test", task_runner, task_runner, task_runner,
Expand Down Expand Up @@ -2001,6 +2030,11 @@ TEST_F(ShellTest, CanRegisterImageDecoders) {
}

TEST_F(ShellTest, OnServiceProtocolGetSkSLsWorks) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
#endif // defined(WINUWP)

fml::ScopedTemporaryDirectory base_dir;
ASSERT_TRUE(base_dir.fd().is_valid());
PersistentCache::SetCacheDirectoryPath(base_dir.path());
Expand Down Expand Up @@ -2432,6 +2466,11 @@ TEST_F(ShellTest, IgnoresInvalidMetrics) {
}

TEST_F(ShellTest, OnServiceProtocolSetAssetBundlePathWorks) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires vm service sandboxing fix";
#endif // defined(WINUWP)

Settings settings = CreateSettingsForFixture();
std::unique_ptr<Shell> shell = CreateShell(settings);
RunConfiguration configuration =
Expand Down Expand Up @@ -2504,6 +2543,11 @@ TEST_F(ShellTest, EngineRootIsolateLaunchesDontTakeVMDataSettings) {
}

TEST_F(ShellTest, AssetManagerSingle) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

fml::ScopedTemporaryDirectory asset_dir;
fml::UniqueFD asset_dir_fd = fml::OpenDirectory(
asset_dir.path().c_str(), false, fml::FilePermission::kRead);
Expand All @@ -2529,6 +2573,11 @@ TEST_F(ShellTest, AssetManagerSingle) {
}

TEST_F(ShellTest, AssetManagerMulti) {
#if defined(WINUWP)
// TODO(cbracken): Re-enable. https://github.com/flutter/flutter/issues/90481
GTEST_SKIP() << "Skipped on WinUWP; requires filesystem sandboxing fix";
#endif // defined(WINUWP)

fml::ScopedTemporaryDirectory asset_dir;
fml::UniqueFD asset_dir_fd = fml::OpenDirectory(
asset_dir.path().c_str(), false, fml::FilePermission::kRead);
Expand Down