OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
6 #import <XCTest/XCTest.h> | 6 #import <XCTest/XCTest.h> |
7 | 7 |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "components/bookmarks/browser/bookmark_model.h" | 9 #include "components/bookmarks/browser/bookmark_model.h" |
10 #include "components/bookmarks/browser/titled_url_match.h" | 10 #include "components/bookmarks/browser/titled_url_match.h" |
11 #include "components/browser_sync/profile_sync_service.h" | 11 #include "components/browser_sync/profile_sync_service.h" |
12 #include "components/strings/grit/components_strings.h" | 12 #include "components/strings/grit/components_strings.h" |
13 #include "components/sync/base/model_type.h" | 13 #include "components/sync/base/model_type.h" |
14 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" | 14 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
15 #include "ios/chrome/browser/bookmarks/bookmarks_utils.h" | 15 #include "ios/chrome/browser/bookmarks/bookmarks_utils.h" |
16 #include "ios/chrome/browser/signin/authentication_service.h" | 16 #include "ios/chrome/browser/signin/authentication_service.h" |
17 #include "ios/chrome/browser/signin/authentication_service_factory.h" | 17 #include "ios/chrome/browser/signin/authentication_service_factory.h" |
18 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" | 18 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" |
19 #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h" | 19 #import "ios/chrome/browser/ui/settings/settings_collection_view_controller.h" |
20 #import "ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h" | 20 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" |
21 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" | 21 #import "ios/chrome/browser/ui/tools_menu/tools_popup_controller.h" |
22 #include "ios/chrome/grit/ios_strings.h" | 22 #include "ios/chrome/grit/ios_strings.h" |
23 #import "ios/chrome/test/app/bookmarks_test_util.h" | 23 #import "ios/chrome/test/app/bookmarks_test_util.h" |
24 #import "ios/chrome/test/app/chrome_test_util.h" | 24 #import "ios/chrome/test/app/chrome_test_util.h" |
25 #import "ios/chrome/test/app/history_test_util.h" | 25 #import "ios/chrome/test/app/history_test_util.h" |
26 #import "ios/chrome/test/app/sync_test_util.h" | 26 #import "ios/chrome/test/app/sync_test_util.h" |
27 #import "ios/chrome/test/app/tab_test_util.h" | 27 #import "ios/chrome/test/app/tab_test_util.h" |
28 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 28 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
29 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 29 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |
30 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 30 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 // Verify the correct number of bookmarks exist. | 629 // Verify the correct number of bookmarks exist. |
630 base::string16 matchString = base::SysNSStringToUTF16(title); | 630 base::string16 matchString = base::SysNSStringToUTF16(title); |
631 std::vector<bookmarks::TitledUrlMatch> matches; | 631 std::vector<bookmarks::TitledUrlMatch> matches; |
632 bookmarkModel->GetBookmarksMatching(matchString, 50, &matches); | 632 bookmarkModel->GetBookmarksMatching(matchString, 50, &matches); |
633 const size_t count = matches.size(); | 633 const size_t count = matches.size(); |
634 GREYAssertEqual(expectedCount, count, @"Unexpected number of bookmarks"); | 634 GREYAssertEqual(expectedCount, count, @"Unexpected number of bookmarks"); |
635 } | 635 } |
636 | 636 |
637 @end | 637 @end |
OLD | NEW |