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

Side by Side Diff: chrome/browser/history/android/sqlite_cursor_unittest.cc

Issue 584013002: Componentize history_types.{cc,h} and android_history_types.{cc,h} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/android/sqlite_cursor.h" 5 #include "chrome/browser/history/android/sqlite_cursor.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "base/task/cancelable_task_tracker.h" 13 #include "base/task/cancelable_task_tracker.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 15 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
16 #include "chrome/browser/favicon/chrome_favicon_client.h" 16 #include "chrome/browser/favicon/chrome_favicon_client.h"
17 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" 17 #include "chrome/browser/favicon/chrome_favicon_client_factory.h"
18 #include "chrome/browser/favicon/favicon_service.h" 18 #include "chrome/browser/favicon/favicon_service.h"
19 #include "chrome/browser/history/android/android_history_provider_service.h" 19 #include "chrome/browser/history/android/android_history_provider_service.h"
20 #include "chrome/browser/history/android/android_history_types.h"
21 #include "chrome/browser/history/android/android_time.h" 20 #include "chrome/browser/history/android/android_time.h"
22 #include "chrome/browser/history/history_service.h" 21 #include "chrome/browser/history/history_service.h"
23 #include "chrome/browser/history/history_service_factory.h" 22 #include "chrome/browser/history/history_service_factory.h"
24 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
25 #include "chrome/test/base/testing_browser_process.h" 24 #include "chrome/test/base/testing_browser_process.h"
26 #include "chrome/test/base/testing_profile.h" 25 #include "chrome/test/base/testing_profile.h"
27 #include "chrome/test/base/testing_profile_manager.h" 26 #include "chrome/test/base/testing_profile_manager.h"
28 #include "components/bookmarks/test/bookmark_test_helpers.h" 27 #include "components/bookmarks/test/bookmark_test_helpers.h"
28 #include "components/history/core/android/android_history_types.h"
29 #include "content/public/browser/browser_thread.h" 29 #include "content/public/browser/browser_thread.h"
30 #include "content/public/test/test_browser_thread.h" 30 #include "content/public/test/test_browser_thread.h"
31 #include "content/public/test/test_utils.h" 31 #include "content/public/test/test_utils.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 namespace { 34 namespace {
35 35
36 using base::Bind; 36 using base::Bind;
37 using base::Time; 37 using base::Time;
38 using content::BrowserThread; 38 using content::BrowserThread;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 cursor->GetBlob(env, NULL, 3); 223 cursor->GetBlob(env, NULL, 3);
224 std::vector<uint8> out; 224 std::vector<uint8> out;
225 base::android::JavaByteArrayToByteVector(env, data.obj(), &out); 225 base::android::JavaByteArrayToByteVector(env, data.obj(), &out);
226 EXPECT_EQ(data_bytes->data().size(), out.size()); 226 EXPECT_EQ(data_bytes->data().size(), out.size());
227 EXPECT_EQ(data_bytes->data()[0], out[0]); 227 EXPECT_EQ(data_bytes->data()[0], out[0]);
228 cursor->Destroy(env, NULL); 228 cursor->Destroy(env, NULL);
229 // Cursor::Destroy posts the task in UI thread, run Message loop to release 229 // Cursor::Destroy posts the task in UI thread, run Message loop to release
230 // the statement, delete SQLiteCursor itself etc. 230 // the statement, delete SQLiteCursor itself etc.
231 content::RunAllPendingInMessageLoop(); 231 content::RunAllPendingInMessageLoop();
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor.cc ('k') | chrome/browser/history/download_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698