Upstream version 10.38.222.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / history / android / android_history_types_unittest.cc
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.
4
5 #include "chrome/browser/history/android/android_history_types.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace history {
10
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"));
30 }
31
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"));
36 }
37
38 }  // namespace history