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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/website_settings/website_settings_popup_view.h " 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" 8 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
9 #include "chrome/browser/ui/views/website_settings/chosen_object_view.h" 9 #include "chrome/browser/ui/views/website_settings/chosen_object_view.h"
10 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" 10 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 void TearDown() override { parent_window_->CloseNow(); } 144 void TearDown() override { parent_window_->CloseNow(); }
145 145
146 protected: 146 protected:
147 TestDeviceClient device_client_; 147 TestDeviceClient device_client_;
148 ScopedWebContentsTestHelper web_contents_helper_; 148 ScopedWebContentsTestHelper web_contents_helper_;
149 views::ScopedViewsTestHelper views_helper_; 149 views::ScopedViewsTestHelper views_helper_;
150 150
151 views::Widget* parent_window_ = nullptr; // Weak. Owned by the NativeWidget. 151 views::Widget* parent_window_ = nullptr; // Weak. Owned by the NativeWidget.
152 scoped_ptr<test::WebsiteSettingsPopupViewTestApi> api_; 152 std::unique_ptr<test::WebsiteSettingsPopupViewTestApi> api_;
153 153
154 private: 154 private:
155 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupViewTest); 155 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsPopupViewTest);
156 }; 156 };
157 157
158 } // namespace 158 } // namespace
159 159
160 // Test UI construction and reconstruction via 160 // Test UI construction and reconstruction via
161 // WebsiteSettingsPopupView::SetPermissionInfo(). 161 // WebsiteSettingsPopupView::SetPermissionInfo().
162 TEST_F(WebsiteSettingsPopupViewTest, SetPermissionInfo) { 162 TEST_F(WebsiteSettingsPopupViewTest, SetPermissionInfo) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 247 const ui::MouseEvent event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(),
248 ui::EventTimeForNow(), 0, 0); 248 ui::EventTimeForNow(), 0, 0);
249 views::ButtonListener* button_listener = 249 views::ButtonListener* button_listener =
250 static_cast<views::ButtonListener*>(object_view); 250 static_cast<views::ButtonListener*>(object_view);
251 button_listener->ButtonPressed(button, event); 251 button_listener->ButtonPressed(button, event);
252 api_->SetPermissionInfo(list); 252 api_->SetPermissionInfo(list);
253 EXPECT_EQ(kExpectedChildren, api_->permissions_content()->child_count()); 253 EXPECT_EQ(kExpectedChildren, api_->permissions_content()->child_count());
254 EXPECT_FALSE(store->HasDevicePermission( 254 EXPECT_FALSE(store->HasDevicePermission(
255 origin, origin, *device::usb::DeviceInfo::From(*device))); 255 origin, origin, *device::usb::DeviceInfo::From(*device)));
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698