Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm

Issue 2737203002: Remove CRWSessionEntry. (Closed)
Patch Set: fix XCode-clang build Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm b/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
index 6f1e9e77e87b5912eb244edf347a7f0a35cf33fd..e0471ddd6e73bacc657e34f82c523092aede232b 100644
--- a/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
+++ b/ios/chrome/browser/ui/history/tab_history_popup_controller_unittest.mm
@@ -12,6 +12,7 @@
#import "ios/chrome/browser/ui/history/tab_history_view_controller.h"
#include "ios/chrome/browser/ui/ui_util.h"
#include "ios/web/public/navigation_item.h"
+#include "ios/web/public/navigation_item_list.h"
#include "ios/web/public/referrer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -30,7 +31,9 @@ + (CGFloat)popupWidthForItems:(const web::NavigationItemList)items;
class TabHistoryPopupControllerTest : public PlatformTest {
protected:
- void SetUp() override {
+ TabHistoryPopupControllerTest() : PlatformTest() {
+ parent_.reset([[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]);
+ // Create test items and populate |items_|.
web::Referrer referrer(GURL("http://www.example.com"),
web::ReferrerPolicyDefault);
items_.push_back(web::NavigationItem::Create());
@@ -40,10 +43,10 @@ void SetUp() override {
items_.back()->SetURL(GURL("http://www.example.com/1"));
items_.back()->SetReferrer(referrer);
items_.push_back(web::NavigationItem::Create());
- items_.back()->SetURL(GURL("http://www.example.com/0"));
+ items_.back()->SetURL(GURL("http://www.example.com/2"));
items_.back()->SetReferrer(referrer);
-
- parent_.reset([[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]);
+ // Create the popup controller using CRWSessionEntries created from the
+ // NavigationItems in |items_|.
popup_.reset([[TabHistoryPopupController alloc]
initWithOrigin:CGPointZero
parentView:parent_
« no previous file with comments | « no previous file | ios/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698