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

Side by Side Diff: chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate _views.h" 5 #include "chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate _views.h"
6 6
7 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 7 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/common/context_menu_params.h" 10 #include "content/public/common/context_menu_params.h"
11 11
12 typedef ChromeRenderViewHostTestHarness ChromeWebContentsViewDelegateViewsTest; 12 typedef ChromeRenderViewHostTestHarness ChromeWebContentsViewDelegateViewsTest;
13 13
14 // Test that makes sure ShowContextMenu does not crash if web_contents() does 14 // Test that makes sure ShowContextMenu does not crash if web_contents() does
15 // not have a focused frame. 15 // not have a focused frame.
16 TEST_F(ChromeWebContentsViewDelegateViewsTest, ContextMenuNoFocusedFrame) { 16 TEST_F(ChromeWebContentsViewDelegateViewsTest, ContextMenuNoFocusedFrame) {
17 scoped_ptr<content::WebContentsViewDelegate> delegate_view( 17 std::unique_ptr<content::WebContentsViewDelegate> delegate_view(
18 chrome::CreateWebContentsViewDelegate(web_contents())); 18 chrome::CreateWebContentsViewDelegate(web_contents()));
19 EXPECT_FALSE(web_contents()->GetFocusedFrame()); 19 EXPECT_FALSE(web_contents()->GetFocusedFrame());
20 const content::ContextMenuParams params; 20 const content::ContextMenuParams params;
21 delegate_view->ShowContextMenu(web_contents()->GetMainFrame(), params); 21 delegate_view->ShowContextMenu(web_contents()->GetMainFrame(), params);
22 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698