Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2953)

Unified Diff: blimp/engine/app/settings_manager_unittest.cc

Issue 1903873003: blimp: Update animation policy for images on the blimp engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove EngineSettings cc file. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/engine/app/settings_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/app/settings_manager_unittest.cc
diff --git a/blimp/engine/app/settings_manager_unittest.cc b/blimp/engine/app/settings_manager_unittest.cc
index 2b6a2d2171ba874d1b5dd2fb4d4ce839bc5ee6a9..8d456520c730ecba8a1477cf14bc1e669fbcc255 100644
--- a/blimp/engine/app/settings_manager_unittest.cc
+++ b/blimp/engine/app/settings_manager_unittest.cc
@@ -40,6 +40,25 @@ TEST_F(SettingsManagerTest, InformsObserversCorrectly) {
settings_manager_.UpdateEngineSettings(settings);
}
+TEST_F(SettingsManagerTest, UpdatesSettingsCorrectly) {
+ EngineSettings settings = settings_manager_.GetEngineSettings();
+ EXPECT_FALSE(settings.record_whole_document);
+ EXPECT_EQ(settings.animation_policy,
+ content::ImageAnimationPolicy::IMAGE_ANIMATION_POLICY_NO_ANIMATION);
+
+ settings.record_whole_document = true;
+ settings.animation_policy =
+ content::ImageAnimationPolicy::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE;
+ settings_manager_.UpdateEngineSettings(settings);
+
+ content::WebPreferences prefs;
+ settings_manager_.UpdateWebkitPreferences(&prefs);
+ EXPECT_TRUE(prefs.record_whole_document);
+ EXPECT_EQ(
+ prefs.animation_policy,
+ content::ImageAnimationPolicy::IMAGE_ANIMATION_POLICY_ANIMATION_ONCE);
+}
+
} // namespace
} // namespace engine
« no previous file with comments | « blimp/engine/app/settings_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698