| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import <Foundation/Foundation.h> | 5 #import <Foundation/Foundation.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "components/bookmarks/browser/bookmark_model.h" | 13 #include "components/bookmarks/browser/bookmark_model.h" |
| 14 #include "components/bookmarks/test/bookmark_test_helpers.h" | 14 #include "components/bookmarks/test/bookmark_test_helpers.h" |
| 15 #include "components/toolbar/test_toolbar_model.h" | 15 #include "components/toolbar/test_toolbar_model.h" |
| 16 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" | 16 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
| 17 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" | 17 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" |
| 18 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" | 18 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" |
| 19 #include "ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.h" | 19 #include "ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.h" |
| 20 #include "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h" | |
| 21 #include "ios/chrome/browser/web_state_list/web_state_list.h" | |
| 22 #import "ios/chrome/browser/xcallback_parameters.h" | 20 #import "ios/chrome/browser/xcallback_parameters.h" |
| 21 #include "ios/shared/chrome/browser/tabs/fake_web_state_list_delegate.h" |
| 22 #include "ios/shared/chrome/browser/tabs/web_state_list.h" |
| 23 #import "ios/testing/ocmock_complex_type_helper.h" | 23 #import "ios/testing/ocmock_complex_type_helper.h" |
| 24 #import "ios/web/public/test/fakes/test_navigation_manager.h" | 24 #import "ios/web/public/test/fakes/test_navigation_manager.h" |
| 25 #import "ios/web/public/test/fakes/test_web_state.h" | 25 #import "ios/web/public/test/fakes/test_web_state.h" |
| 26 #include "ios/web/public/test/test_web_thread.h" | 26 #include "ios/web/public/test/test_web_thread.h" |
| 27 #include "ios/web/public/test/test_web_thread_bundle.h" | 27 #include "ios/web/public/test/test_web_thread_bundle.h" |
| 28 #include "testing/gtest_mac.h" | 28 #include "testing/gtest_mac.h" |
| 29 #include "testing/platform_test.h" | 29 #include "testing/platform_test.h" |
| 30 #include "third_party/ocmock/gtest_support.h" | 30 #include "third_party/ocmock/gtest_support.h" |
| 31 #include "third_party/ocmock/ocmock_extensions.h" | 31 #include "third_party/ocmock/ocmock_extensions.h" |
| 32 | 32 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 base::UTF8ToUTF16(kWebUrl), GURL(kWebUrl)); | 193 base::UTF8ToUTF16(kWebUrl), GURL(kWebUrl)); |
| 194 EXPECT_TRUE(toolbarModel_->IsCurrentTabBookmarked()); | 194 EXPECT_TRUE(toolbarModel_->IsCurrentTabBookmarked()); |
| 195 | 195 |
| 196 // Remove the bookmark and verify the toolbar model indicates that the URL is | 196 // Remove the bookmark and verify the toolbar model indicates that the URL is |
| 197 // not bookmarked. | 197 // not bookmarked. |
| 198 bookmark_model->Remove(node); | 198 bookmark_model->Remove(node); |
| 199 EXPECT_FALSE(toolbarModel_->IsCurrentTabBookmarked()); | 199 EXPECT_FALSE(toolbarModel_->IsCurrentTabBookmarked()); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace | 202 } // namespace |
| OLD | NEW |