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 "ios/web/navigation/crw_session_entry.h" | 5 #import "ios/web/navigation/crw_session_entry.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/mac/scoped_nsobject.h" | 12 #import "base/mac/scoped_nsobject.h" |
13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
14 #import "ios/testing/ocmock_complex_type_helper.h" | 14 #import "ios/testing/ocmock_complex_type_helper.h" |
15 #include "ios/web/navigation/navigation_item_impl.h" | 15 #import "ios/web/navigation/navigation_item_impl.h" |
16 #include "ios/web/public/referrer.h" | 16 #include "ios/web/public/referrer.h" |
17 #import "net/base/mac/url_conversions.h" | 17 #import "net/base/mac/url_conversions.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "testing/gtest_mac.h" | 19 #import "testing/gtest_mac.h" |
20 #include "testing/platform_test.h" | 20 #include "testing/platform_test.h" |
21 #import "third_party/ocmock/OCMock/OCMock.h" | 21 #import "third_party/ocmock/OCMock/OCMock.h" |
22 #include "third_party/ocmock/gtest_support.h" | 22 #include "third_party/ocmock/gtest_support.h" |
23 #include "ui/base/page_transition_types.h" | 23 #include "ui/base/page_transition_types.h" |
24 | 24 |
25 @interface CRWSessionEntry (ExposedForTesting) | 25 @interface CRWSessionEntry (ExposedForTesting) |
26 + (web::PageScrollState)pageStateFromDictionary:(NSDictionary*)dictionary; | 26 + (web::PageScrollState)pageStateFromDictionary:(NSDictionary*)dictionary; |
27 + (NSDictionary*)dictionaryFromPageDisplayState: | 27 + (NSDictionary*)dictionaryFromPageDisplayState: |
28 (const web::PageDisplayState&)displayState; | 28 (const web::PageDisplayState&)displayState; |
29 @end | 29 @end |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 TEST_F(CRWSessionEntryTest, NonEmptyVirtualUrl) { | 329 TEST_F(CRWSessionEntryTest, NonEmptyVirtualUrl) { |
330 web::NavigationItem* item = [sessionEntry_ navigationItem]; | 330 web::NavigationItem* item = [sessionEntry_ navigationItem]; |
331 item->SetVirtualURL(GURL("http://user.friendly")); | 331 item->SetVirtualURL(GURL("http://user.friendly")); |
332 EXPECT_EQ(GURL("http://user.friendly/"), item->GetVirtualURL()); | 332 EXPECT_EQ(GURL("http://user.friendly/"), item->GetVirtualURL()); |
333 EXPECT_EQ(GURL("http://init.test/"), item->GetURL()); | 333 EXPECT_EQ(GURL("http://init.test/"), item->GetURL()); |
334 } | 334 } |
335 | 335 |
336 TEST_F(CRWSessionEntryTest, EmptyDescription) { | 336 TEST_F(CRWSessionEntryTest, EmptyDescription) { |
337 EXPECT_GT([[sessionEntry_ description] length], 0U); | 337 EXPECT_GT([[sessionEntry_ description] length], 0U); |
338 } | 338 } |
OLD | NEW |