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

Side by Side Diff: ios/web/web_state/web_state_delegate_bridge_unittest.mm

Issue 2028823003: Mac: Make ScopedTypeRef require explicit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS build Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/passwords/password_controller_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ios/web/public/web_state/web_state_delegate_bridge.h" 5 #import "ios/web/public/web_state/web_state_delegate_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 // Tests |HandleContextMenu| forwarding. 48 // Tests |HandleContextMenu| forwarding.
49 TEST_F(WebStateDelegateBridgeTest, HandleContextMenu) { 49 TEST_F(WebStateDelegateBridgeTest, HandleContextMenu) {
50 EXPECT_EQ(nil, [delegate_ contextMenuParams]); 50 EXPECT_EQ(nil, [delegate_ contextMenuParams]);
51 web::ContextMenuParams context_menu_params; 51 web::ContextMenuParams context_menu_params;
52 context_menu_params.menu_title.reset([@"Menu title" copy]); 52 context_menu_params.menu_title.reset([@"Menu title" copy]);
53 context_menu_params.link_url = GURL("http://www.url.com"); 53 context_menu_params.link_url = GURL("http://www.url.com");
54 context_menu_params.src_url = GURL("http://www.url.com/image.jpeg"); 54 context_menu_params.src_url = GURL("http://www.url.com/image.jpeg");
55 context_menu_params.referrer_policy = web::ReferrerPolicyOrigin; 55 context_menu_params.referrer_policy = web::ReferrerPolicyOrigin;
56 context_menu_params.view = [UIView new]; 56 context_menu_params.view.reset([UIView new]);
Eugene But (OOO till 7-30) 2016/06/01 05:12:07 Optional NIT: Since you touching this, could you p
57 context_menu_params.location = CGPointMake(5.0, 5.0); 57 context_menu_params.location = CGPointMake(5.0, 5.0);
58 bridge_->HandleContextMenu(nullptr, context_menu_params); 58 bridge_->HandleContextMenu(nullptr, context_menu_params);
59 web::ContextMenuParams* result_params = [delegate_ contextMenuParams]; 59 web::ContextMenuParams* result_params = [delegate_ contextMenuParams];
60 EXPECT_NE(nullptr, result_params); 60 EXPECT_NE(nullptr, result_params);
61 EXPECT_EQ(context_menu_params.menu_title, result_params->menu_title); 61 EXPECT_EQ(context_menu_params.menu_title, result_params->menu_title);
62 EXPECT_EQ(context_menu_params.link_url, result_params->link_url); 62 EXPECT_EQ(context_menu_params.link_url, result_params->link_url);
63 EXPECT_EQ(context_menu_params.src_url, result_params->src_url); 63 EXPECT_EQ(context_menu_params.src_url, result_params->src_url);
64 EXPECT_EQ(context_menu_params.referrer_policy, 64 EXPECT_EQ(context_menu_params.referrer_policy,
65 result_params->referrer_policy); 65 result_params->referrer_policy);
66 EXPECT_EQ(context_menu_params.view, result_params->view); 66 EXPECT_EQ(context_menu_params.view, result_params->view);
67 EXPECT_EQ(context_menu_params.location.x, result_params->location.x); 67 EXPECT_EQ(context_menu_params.location.x, result_params->location.x);
68 EXPECT_EQ(context_menu_params.location.y, result_params->location.y); 68 EXPECT_EQ(context_menu_params.location.y, result_params->location.y);
69 } 69 }
70 70
71 } // namespace web 71 } // namespace web
OLDNEW
« no previous file with comments | « ios/chrome/browser/passwords/password_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698