1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/history/android/android_history_types.h"
7 #include "testing/gtest/include/gtest/gtest.h"
11 TEST(AndroidHistoryTypesTest, TestGetBookmarkColumnID) {
12 EXPECT_EQ(HistoryAndBookmarkRow::ID,
13 HistoryAndBookmarkRow::GetColumnID("_id"));
14 EXPECT_EQ(HistoryAndBookmarkRow::URL,
15 HistoryAndBookmarkRow::GetColumnID("url"));
16 EXPECT_EQ(HistoryAndBookmarkRow::TITLE,
17 HistoryAndBookmarkRow::GetColumnID("title"));
18 EXPECT_EQ(HistoryAndBookmarkRow::CREATED,
19 HistoryAndBookmarkRow::GetColumnID("created"));
20 EXPECT_EQ(HistoryAndBookmarkRow::LAST_VISIT_TIME,
21 HistoryAndBookmarkRow::GetColumnID("date"));
22 EXPECT_EQ(HistoryAndBookmarkRow::VISIT_COUNT,
23 HistoryAndBookmarkRow::GetColumnID("visits"));
24 EXPECT_EQ(HistoryAndBookmarkRow::FAVICON,
25 HistoryAndBookmarkRow::GetColumnID("favicon"));
26 EXPECT_EQ(HistoryAndBookmarkRow::BOOKMARK,
27 HistoryAndBookmarkRow::GetColumnID("bookmark"));
28 EXPECT_EQ(HistoryAndBookmarkRow::RAW_URL,
29 HistoryAndBookmarkRow::GetColumnID("raw_url"));
32 TEST(AndroidHistoryTypesTest, TestGetSearchColumnID) {
33 EXPECT_EQ(SearchRow::ID, SearchRow::GetColumnID("_id"));
34 EXPECT_EQ(SearchRow::SEARCH_TERM, SearchRow::GetColumnID("search"));
35 EXPECT_EQ(SearchRow::SEARCH_TIME, SearchRow::GetColumnID("date"));
38 } // namespace history