| 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/ssl/ios_security_state_tab_helper.h" | 18 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h" |
| 19 #import "ios/chrome/browser/tabs/tab.h" | 19 #import "ios/chrome/browser/tabs/tab.h" |
| 20 #import "ios/chrome/browser/tabs/tab_model.h" | 20 #import "ios/chrome/browser/tabs/tab_model.h" |
| 21 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" | 21 #include "ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h" |
| 22 #include "ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.h" | 22 #include "ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.h" |
| 23 #import "ios/chrome/browser/xcallback_parameters.h" | 23 #import "ios/chrome/browser/xcallback_parameters.h" |
| 24 #import "ios/testing/ocmock_complex_type_helper.h" | 24 #import "ios/testing/ocmock_complex_type_helper.h" |
| 25 #import "ios/web/public/navigation_item.h" | 25 #import "ios/web/public/navigation_item.h" |
| 26 #import "ios/web/public/test/test_navigation_manager.h" | 26 #import "ios/web/public/test/fakes/test_navigation_manager.h" |
| 27 #import "ios/web/public/test/test_web_state.h" | 27 #import "ios/web/public/test/fakes/test_web_state.h" |
| 28 #include "ios/web/public/test/test_web_thread.h" | 28 #include "ios/web/public/test/test_web_thread.h" |
| 29 #include "ios/web/public/test/test_web_thread_bundle.h" | 29 #include "ios/web/public/test/test_web_thread_bundle.h" |
| 30 #include "testing/gtest_mac.h" | 30 #include "testing/gtest_mac.h" |
| 31 #include "testing/platform_test.h" | 31 #include "testing/platform_test.h" |
| 32 #include "third_party/ocmock/gtest_support.h" | 32 #include "third_party/ocmock/gtest_support.h" |
| 33 #include "third_party/ocmock/ocmock_extensions.h" | 33 #include "third_party/ocmock/ocmock_extensions.h" |
| 34 | 34 |
| 35 @interface TMITestTabMock : OCMockComplexTypeHelper { | 35 @interface TMITestTabMock : OCMockComplexTypeHelper { |
| 36 GURL url_; | 36 GURL url_; |
| 37 web::WebState* web_state_; | 37 web::WebState* web_state_; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 base::UTF8ToUTF16(no_scheme_url)); | 269 base::UTF8ToUTF16(no_scheme_url)); |
| 270 EXPECT_EQ(length, 0u); | 270 EXPECT_EQ(length, 0u); |
| 271 | 271 |
| 272 visible_item->SetVirtualURL(GURL(chrome_url)); | 272 visible_item->SetVirtualURL(GURL(chrome_url)); |
| 273 EXPECT_EQ(toolbarModel_->GetFormattedURL(&length), | 273 EXPECT_EQ(toolbarModel_->GetFormattedURL(&length), |
| 274 base::UTF8ToUTF16(chrome_url)); | 274 base::UTF8ToUTF16(chrome_url)); |
| 275 EXPECT_EQ(length, 9u); | 275 EXPECT_EQ(length, 9u); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace | 278 } // namespace |
| OLD | NEW |