| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/history/web_history_service_factory.h" | 15 #include "chrome/browser/history/web_history_service_factory.h" |
| 16 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 16 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
| 17 #include "chrome/browser/signin/fake_signin_manager_builder.h" | 17 #include "chrome/browser/signin/fake_signin_manager_builder.h" |
| 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 18 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 19 #include "chrome/browser/signin/signin_manager_factory.h" | 19 #include "chrome/browser/signin/signin_manager_factory.h" |
| 20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 21 #include "chrome/browser/sync/profile_sync_test_util.h" | 21 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "components/browser_sync/browser/test_profile_sync_service.h" | 23 #include "components/browser_sync/test_profile_sync_service.h" |
| 24 #include "components/history/core/test/fake_web_history_service.h" | 24 #include "components/history/core/test/fake_web_history_service.h" |
| 25 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 25 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 26 #include "components/signin/core/browser/fake_signin_manager.h" | 26 #include "components/signin/core/browser/fake_signin_manager.h" |
| 27 #include "components/sync/base/model_type.h" | 27 #include "components/sync/base/model_type.h" |
| 28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "content/public/test/test_browser_thread_bundle.h" | 30 #include "content/public/test/test_browser_thread_bundle.h" |
| 31 #include "content/public/test/test_web_ui.h" | 31 #include "content/public/test/test_web_ui.h" |
| 32 #include "net/http/http_status_code.h" | 32 #include "net/http/http_status_code.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 const base::DictionaryValue* first_entry; | 341 const base::DictionaryValue* first_entry; |
| 342 ASSERT_TRUE(arg2->GetDictionary(0, &first_entry)); | 342 ASSERT_TRUE(arg2->GetDictionary(0, &first_entry)); |
| 343 | 343 |
| 344 base::string16 title; | 344 base::string16 title; |
| 345 ASSERT_TRUE(first_entry->GetString("title", &title)); | 345 ASSERT_TRUE(first_entry->GetString("title", &title)); |
| 346 | 346 |
| 347 ASSERT_EQ(0u, title.find(base::ASCIIToUTF16("http://loooo"))); | 347 ASSERT_EQ(0u, title.find(base::ASCIIToUTF16("http://loooo"))); |
| 348 EXPECT_EQ(300u, title.size()); | 348 EXPECT_EQ(300u, title.size()); |
| 349 } | 349 } |
| 350 #endif | 350 #endif |
| OLD | NEW |