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

Unified Diff: chrome/browser/ui/webui/ntp/shown_sections_handler_unittest.cc

Issue 8438028: ntp: remove ShownSectionHandler and all references to it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more functional test updates Created 9 years, 1 month 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 | « chrome/browser/ui/webui/ntp/shown_sections_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/shown_sections_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler_unittest.cc b/chrome/browser/ui/webui/ntp/shown_sections_handler_unittest.cc
deleted file mode 100644
index ae071d4c2c8be01e0844cd38f5f99611be6a232a..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/ntp/shown_sections_handler_unittest.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 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 "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/prefs/pref_value_store.h"
-#include "chrome/common/json_pref_store.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/base/testing_pref_service.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class ShownSectionsHandlerTest : public testing::Test {
-};
-
-namespace {
-
-int MigratePrefValue(PrefService* prefs, int starting_value) {
- prefs->SetInteger(prefs::kNTPShownSections, starting_value);
- ShownSectionsHandler::MigrateUserPrefs(prefs, 1, 3);
- return prefs->GetInteger(prefs::kNTPShownSections);
-}
-
-} // namespace
-
-TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs) {
- scoped_ptr<PrefService> pref(new TestingPrefService);
-
- pref->RegisterIntegerPref(prefs::kNTPShownSections, 0);
-
- EXPECT_EQ(APPS, MigratePrefValue(pref.get(), APPS));
- EXPECT_EQ(THUMB, MigratePrefValue(pref.get(), THUMB));
- EXPECT_EQ(APPS, MigratePrefValue(pref.get(), APPS | THUMB));
-
- // 2 is not currently used, but older state may contain it and we should do
- // something reasonable.
- EXPECT_EQ(THUMB, MigratePrefValue(pref.get(), 3));
-
- // 0 can't correspond to any section, but we should still do something
- // reasonable.
- EXPECT_EQ(THUMB, MigratePrefValue(pref.get(), 0));
-}
« no previous file with comments | « chrome/browser/ui/webui/ntp/shown_sections_handler.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698