OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/browsing_history_handler.h" | 5 #include "chrome/browser/ui/webui/browsing_history_handler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const BrowsingHistoryHandler::HistoryEntry& result, | 70 const BrowsingHistoryHandler::HistoryEntry& result, |
71 const TestResult& correct_result) { | 71 const TestResult& correct_result) { |
72 base::Time correct_time = | 72 base::Time correct_time = |
73 baseline_time + base::TimeDelta::FromHours(correct_result.hour_offset); | 73 baseline_time + base::TimeDelta::FromHours(correct_result.hour_offset); |
74 | 74 |
75 return result.time == correct_time && result.url == GURL(correct_result.url); | 75 return result.time == correct_time && result.url == GURL(correct_result.url); |
76 } | 76 } |
77 | 77 |
78 void IgnoreBoolAndDoNothing(bool ignored_argument) {} | 78 void IgnoreBoolAndDoNothing(bool ignored_argument) {} |
79 | 79 |
80 class TestSyncService : public TestProfileSyncService { | 80 class TestSyncService : public browser_sync::TestProfileSyncService { |
81 public: | 81 public: |
82 explicit TestSyncService(Profile* profile) | 82 explicit TestSyncService(Profile* profile) |
83 : TestProfileSyncService(CreateProfileSyncServiceParamsForTest(profile)), | 83 : browser_sync::TestProfileSyncService( |
| 84 CreateProfileSyncServiceParamsForTest(profile)), |
84 sync_active_(true) {} | 85 sync_active_(true) {} |
85 | 86 |
86 bool IsSyncActive() const override { return sync_active_; } | 87 bool IsSyncActive() const override { return sync_active_; } |
87 | 88 |
88 syncer::ModelTypeSet GetActiveDataTypes() const override { | 89 syncer::ModelTypeSet GetActiveDataTypes() const override { |
89 return syncer::ModelTypeSet::All(); | 90 return syncer::ModelTypeSet::All(); |
90 } | 91 } |
91 | 92 |
92 void SetSyncActive(bool active) { | 93 void SetSyncActive(bool active) { |
93 sync_active_ = active; | 94 sync_active_ = active; |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 const base::DictionaryValue* first_entry; | 342 const base::DictionaryValue* first_entry; |
342 ASSERT_TRUE(arg2->GetDictionary(0, &first_entry)); | 343 ASSERT_TRUE(arg2->GetDictionary(0, &first_entry)); |
343 | 344 |
344 base::string16 title; | 345 base::string16 title; |
345 ASSERT_TRUE(first_entry->GetString("title", &title)); | 346 ASSERT_TRUE(first_entry->GetString("title", &title)); |
346 | 347 |
347 ASSERT_EQ(0u, title.find(base::ASCIIToUTF16("http://loooo"))); | 348 ASSERT_EQ(0u, title.find(base::ASCIIToUTF16("http://loooo"))); |
348 EXPECT_EQ(300u, title.size()); | 349 EXPECT_EQ(300u, title.size()); |
349 } | 350 } |
350 #endif | 351 #endif |
OLD | NEW |