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

Side by Side Diff: chrome/browser/ui/views/frame/web_app_left_header_view_ash_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/frame/web_app_left_header_view_ash.h" 5 #include "chrome/browser/ui/views/frame/web_app_left_header_view_ash.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button.h" 7 #include "ash/frame/caption_buttons/frame_caption_button.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // TestWithBrowserView override: 34 // TestWithBrowserView override:
35 void SetUp() override { 35 void SetUp() override {
36 base::CommandLine::ForCurrentProcess()->AppendSwitch( 36 base::CommandLine::ForCurrentProcess()->AppendSwitch(
37 switches::kEnableWebAppFrame); 37 switches::kEnableWebAppFrame);
38 38
39 TestWithBrowserView::SetUp(); 39 TestWithBrowserView::SetUp();
40 40
41 // Setup a fake toolbar to enable testing. 41 // Setup a fake toolbar to enable testing.
42 test_toolbar_model_ = new TestToolbarModel(); 42 test_toolbar_model_ = new TestToolbarModel();
43 scoped_ptr<ToolbarModel> toolbar_model(test_toolbar_model_); 43 std::unique_ptr<ToolbarModel> toolbar_model(test_toolbar_model_);
44 browser()->swap_toolbar_models(&toolbar_model); 44 browser()->swap_toolbar_models(&toolbar_model);
45 test_toolbar_model_->set_icon(gfx::VectorIconId::LOCATION_BAR_HTTP); 45 test_toolbar_model_->set_icon(gfx::VectorIconId::LOCATION_BAR_HTTP);
46 46
47 AddTab(browser(), GURL("about:blank")); 47 AddTab(browser(), GURL("about:blank"));
48 NavigateAndCommitActiveTab(GURL("http://www.google.com")); 48 NavigateAndCommitActiveTab(GURL("http://www.google.com"));
49 browser()->window()->Show(); 49 browser()->window()->Show();
50 50
51 views::Widget* widget = browser_view()->GetWidget(); 51 views::Widget* widget = browser_view()->GetWidget();
52 frame_view_ = static_cast<BrowserNonClientFrameViewAsh*>( 52 frame_view_ = static_cast<BrowserNonClientFrameViewAsh*>(
53 widget->non_client_view()->frame_view()); 53 widget->non_client_view()->frame_view());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 EXPECT_EQ(gfx::VectorIconId::LOCATION_BAR_HTTP, 121 EXPECT_EQ(gfx::VectorIconId::LOCATION_BAR_HTTP,
122 view->location_icon_->icon_image_id()); 122 view->location_icon_->icon_image_id());
123 123
124 test_toolbar_model_->set_icon(gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID); 124 test_toolbar_model_->set_icon(gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID);
125 NavigateAndCommitActiveTab(GURL("https://secure.google.com")); 125 NavigateAndCommitActiveTab(GURL("https://secure.google.com"));
126 126
127 // The location icon should now be the secure one. 127 // The location icon should now be the secure one.
128 EXPECT_EQ(gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID, 128 EXPECT_EQ(gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID,
129 view->location_icon_->icon_image_id()); 129 view->location_icon_->icon_image_id());
130 } 130 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698