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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtilsTest.java

Issue 1688033002: Rename EnhancedBookmarks to Bookmarks, part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments from #2 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/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkUtilsTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/junit/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtilsTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtilsTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtilsTest.java
deleted file mode 100644
index f6133d00d340eb0f2fa75e52a63d627f671af4d7..0000000000000000000000000000000000000000
--- a/chrome/android/junit/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtilsTest.java
+++ /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.
-
-package org.chromium.chrome.browser.enhancedbookmarks;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.mockito.Mockito.verify;
-
-import android.content.Context;
-import android.content.Intent;
-
-import org.chromium.base.test.util.Feature;
-import org.chromium.components.bookmarks.BookmarkId;
-import org.chromium.components.bookmarks.BookmarkType;
-import org.chromium.content_public.browser.WebContents;
-import org.chromium.testing.local.LocalRobolectricTestRunner;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.annotation.Config;
-
-/**
- * Robolectric tests for {@link EnhancedBookmarkUtils}.
- */
-@RunWith(LocalRobolectricTestRunner.class)
-@Config(manifest = Config.NONE)
-public class EnhancedBookmarkUtilsTest {
- @Mock private Context mContext;
- @Mock private EnhancedBookmarksModel mEnhancedBookmarksModel;
- @Mock private WebContents mWebContents;
-
- @Before
- public void setUp() {
- MockitoAnnotations.initMocks(this);
- }
-
- @Test
- @Feature({"Bookmark"})
- public void testStartEditActivityWithoutWebContents() {
- BookmarkId bookmarkId = new BookmarkId(12345L, BookmarkType.NORMAL);
- EnhancedBookmarkUtils.startEditActivity(mContext, bookmarkId, null /* webContents */);
- ArgumentCaptor<Intent> intentArgumentCaptor = ArgumentCaptor.forClass(Intent.class);
-
- verify(mContext).startActivity(intentArgumentCaptor.capture());
-
- // Verify that the intent doesn't contain the WEB_CONTENTS extra.
- assertFalse(intentArgumentCaptor.getValue()
- .hasExtra(EnhancedBookmarkEditActivity.INTENT_WEB_CONTENTS));
- }
-
- @Test
- @Feature({"Bookmark"})
- public void testStartEditActivityWithWebContents() {
- BookmarkId bookmarkId = new BookmarkId(12345L, BookmarkType.NORMAL);
- EnhancedBookmarkUtils.startEditActivity(mContext, bookmarkId, mWebContents);
- ArgumentCaptor<Intent> intentArgumentCaptor = ArgumentCaptor.forClass(Intent.class);
-
- verify(mContext).startActivity(intentArgumentCaptor.capture());
-
- // Verify that the intent contains the right WEB_CONTENTS extra.
- assertEquals(mWebContents, intentArgumentCaptor.getValue()
- .getParcelableExtra(EnhancedBookmarkEditActivity.INTENT_WEB_CONTENTS));
- }
-}
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkUtilsTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698