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

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

Issue 2629743003: Remove all blimp engine code (Closed)
Patch Set: Use consistent comment style in //chrome Created 3 years, 11 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') | blimp/engine/app/switches.h » ('j') | 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
deleted file mode 100644
index c53b4df24ab5d9a590671e077e37a9f7e8ef3e0d..0000000000000000000000000000000000000000
--- a/blimp/engine/app/settings_manager_unittest.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/engine/app/settings_manager.h"
-
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace blimp {
-namespace engine {
-
-namespace {
-
-class MockSettingsManagerObserver : public SettingsManager::Observer {
- public:
- MOCK_METHOD0(OnWebPreferencesChanged, void());
-};
-
-class SettingsManagerTest : public testing::Test {
- public:
- SettingsManagerTest() {}
-
- void SetUp() override { settings_manager_.AddObserver(&observer_); }
-
- void TearDown() override { settings_manager_.RemoveObserver(&observer_); }
-
- protected:
- SettingsManager settings_manager_;
- MockSettingsManagerObserver observer_;
-};
-
-TEST_F(SettingsManagerTest, InformsObserversCorrectly) {
- EngineSettings settings = settings_manager_.GetEngineSettings();
- EXPECT_FALSE(settings.record_whole_document);
-
- EXPECT_CALL(observer_, OnWebPreferencesChanged()).Times(1);
-
- settings.record_whole_document = true;
- 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);
- EXPECT_TRUE(prefs.viewport_meta_enabled);
- EXPECT_EQ(prefs.default_minimum_page_scale_factor, 0.25f);
- EXPECT_EQ(prefs.default_maximum_page_scale_factor, 5.f);
- EXPECT_TRUE(prefs.shrinks_viewport_contents_to_fit);
-}
-
-} // namespace
-
-} // namespace engine
-} // namespace blimp
« no previous file with comments | « blimp/engine/app/settings_manager.cc ('k') | blimp/engine/app/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698