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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageFeatureTest.java

Issue 1894703002: [Offline pages] Removing offline pages from Bookmarks UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Marking more methods as visible for testing 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageFeatureTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageFeatureTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageFeatureTest.java
deleted file mode 100644
index b63e5a669cfef6361bc25831c02a22f0469dad95..0000000000000000000000000000000000000000
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageFeatureTest.java
+++ /dev/null
@@ -1,80 +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.
-
-package org.chromium.chrome.browser.offlinepages;
-
-import android.test.UiThreadTest;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.chromium.base.test.util.CommandLineFlags;
-import org.chromium.chrome.R;
-import org.chromium.chrome.browser.ChromeSwitches;
-import org.chromium.components.offlinepages.FeatureMode;
-import org.chromium.content.browser.test.NativeLibraryTestBase;
-
-/** Unit tests for offline pages feature. */
-public class OfflinePageFeatureTest extends NativeLibraryTestBase {
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- loadNativeLibraryAndInitBrowserProcess();
- }
-
- @CommandLineFlags.Add({ChromeSwitches.ENABLE_OFFLINE_PAGES_AS_BOOKMARKS})
- @SmallTest
- @UiThreadTest
- public void testEnableOfflinePagesAsBookmarks() throws Exception {
- assertEquals(FeatureMode.ENABLED_AS_BOOKMARKS, OfflinePageBridge.getFeatureMode());
-
- /** String is not updated since the experiment switch asks for the "bookmarks" version. */
- assertEquals(
- R.string.menu_bookmarks, OfflinePageUtils.getStringId(R.string.menu_bookmarks));
- /** String is not updated when no mapping exists. */
- assertEquals(R.string.bookmark_offline_page_none,
- OfflinePageUtils.getStringId(R.string.bookmark_offline_page_none));
- }
-
- @CommandLineFlags.Add({ChromeSwitches.ENABLE_OFFLINE_PAGES_AS_SAVED_PAGES})
- @SmallTest
- @UiThreadTest
- public void testEnableOfflinePagesAsSavedPages() throws Exception {
- assertEquals(FeatureMode.ENABLED_AS_SAVED_PAGES, OfflinePageBridge.getFeatureMode());
-
- /** String is updated when a mapping is found. */
- assertEquals(R.string.menu_bookmarks_offline_pages,
- OfflinePageUtils.getStringId(R.string.menu_bookmarks));
- /** String is not updated when no mapping exists. */
- assertEquals(R.string.bookmark_offline_page_none,
- OfflinePageUtils.getStringId(R.string.bookmark_offline_page_none));
- }
-
- @CommandLineFlags.Add({ChromeSwitches.ENABLE_OFFLINE_PAGES})
- @SmallTest
- @UiThreadTest
- public void testEnableOfflinePages() throws Exception {
- assertEquals(FeatureMode.ENABLED_AS_SAVED_PAGES, OfflinePageBridge.getFeatureMode());
-
- /** String is not updated since the experiment switch asks for the "bookmarks" version. */
- assertEquals(R.string.menu_bookmarks_offline_pages,
- OfflinePageUtils.getStringId(R.string.menu_bookmarks));
- /** String is not updated when no mapping exists. */
- assertEquals(R.string.bookmark_offline_page_none,
- OfflinePageUtils.getStringId(R.string.bookmark_offline_page_none));
- }
-
- @CommandLineFlags.Add({ChromeSwitches.DISABLE_OFFLINE_PAGES})
- @SmallTest
- @UiThreadTest
- public void testDisableOfflinePages() throws Exception {
- assertEquals(FeatureMode.DISABLED, OfflinePageBridge.getFeatureMode());
-
- /** Strings are not updated regardless whether the mappings exist when the feature is
- * disabled.
- */
- assertEquals(
- R.string.menu_bookmarks, OfflinePageUtils.getStringId(R.string.menu_bookmarks));
- assertEquals(R.string.bookmark_offline_page_none,
- OfflinePageUtils.getStringId(R.string.bookmark_offline_page_none));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698