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

Unified Diff: chrome/browser/ui/webui/downloads_util_unittest.cc

Issue 1710083005: Remove old downloads UI; Material Design version is now the default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove testing/ Created 4 years, 10 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 | « chrome/browser/ui/webui/downloads_util.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_util_unittest.cc
diff --git a/chrome/browser/ui/webui/downloads_util_unittest.cc b/chrome/browser/ui/webui/downloads_util_unittest.cc
deleted file mode 100644
index 378ded572d2b434d8060da3388599901ff2107b2..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/downloads_util_unittest.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 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/downloads_util.h"
-
-#include "base/command_line.h"
-#include "base/macros.h"
-#include "base/metrics/field_trial.h"
-#include "base/test/mock_entropy_provider.h"
-#include "chrome/common/chrome_switches.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using base::FieldTrialList;
-
-const char* kFieldTrialName = kMaterialDesignDownloadsFinchTrialName;
-
-class MdDownloadsEnabledTest : public testing::Test {
- public:
- MdDownloadsEnabledTest() : field_trial_list_(new base::MockEntropyProvider) {}
- ~MdDownloadsEnabledTest() override {}
-
- private:
- base::FieldTrialList field_trial_list_;
-};
-
-TEST_F(MdDownloadsEnabledTest, DisabledByDefault) {
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- ASSERT_FALSE(cl->HasSwitch(switches::kDisableMaterialDesignDownloads));
- ASSERT_FALSE(cl->HasSwitch(switches::kEnableMaterialDesignDownloads));
- ASSERT_FALSE(base::FieldTrialList::TrialExists(kFieldTrialName));
- EXPECT_FALSE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, EnabledByFieldTrial) {
- ASSERT_TRUE(FieldTrialList::CreateFieldTrial(kFieldTrialName, "Enabled2"));
- EXPECT_TRUE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, DisabledByFieldTrial) {
- ASSERT_TRUE(FieldTrialList::CreateFieldTrial(kFieldTrialName, "Disabled2"));
- EXPECT_FALSE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, EnabledBySwitch) {
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- cl->AppendSwitch(switches::kEnableMaterialDesignDownloads);
- EXPECT_TRUE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, DisabledBySwitch) {
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- cl->AppendSwitch(switches::kDisableMaterialDesignDownloads);
- EXPECT_FALSE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, SwitchOverridesFieldTrial1) {
- ASSERT_TRUE(FieldTrialList::CreateFieldTrial(kFieldTrialName, "Disabled2"));
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- cl->AppendSwitch(switches::kEnableMaterialDesignDownloads);
- EXPECT_TRUE(MdDownloadsEnabled());
-}
-
-TEST_F(MdDownloadsEnabledTest, SwitchOverridesFieldTrial2) {
- ASSERT_TRUE(FieldTrialList::CreateFieldTrial(kFieldTrialName, "Enabled2"));
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- cl->AppendSwitch(switches::kDisableMaterialDesignDownloads);
- EXPECT_FALSE(MdDownloadsEnabled());
-}
« no previous file with comments | « chrome/browser/ui/webui/downloads_util.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698