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

Side by Side Diff: ui/views/controls/button/label_button_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/button/label_button.h" 5 #include "ui/views/controls/button/label_button.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "third_party/skia/include/core/SkBitmap.h" 9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 470
471 void TearDown() override { 471 void TearDown() override {
472 widget_.reset(); 472 widget_.reset();
473 ViewsTestBase::TearDown(); 473 ViewsTestBase::TearDown();
474 ui::test::MaterialDesignControllerTestAPI::UninitializeMode(); 474 ui::test::MaterialDesignControllerTestAPI::UninitializeMode();
475 } 475 }
476 476
477 protected: 477 protected:
478 // Required to host the test target. 478 // Required to host the test target.
479 scoped_ptr<Widget> widget_; 479 std::unique_ptr<Widget> widget_;
480 480
481 // The test target. 481 // The test target.
482 InkDropLabelButton* button_ = nullptr; 482 InkDropLabelButton* button_ = nullptr;
483 483
484 private: 484 private:
485 DISALLOW_COPY_AND_ASSIGN(InkDropLabelButtonTest); 485 DISALLOW_COPY_AND_ASSIGN(InkDropLabelButtonTest);
486 }; 486 };
487 487
488 TEST_F(InkDropLabelButtonTest, HoverStateAfterMouseEnterAndExitEvents) { 488 TEST_F(InkDropLabelButtonTest, HoverStateAfterMouseEnterAndExitEvents) {
489 ui::test::EventGenerator event_generator(GetContext(), 489 ui::test::EventGenerator event_generator(GetContext(),
(...skipping 14 matching lines...) Expand all
504 504
505 // Verifies the target event handler View is the |LabelButton| and not any of 505 // Verifies the target event handler View is the |LabelButton| and not any of
506 // the child Views. 506 // the child Views.
507 TEST_F(InkDropLabelButtonTest, TargetEventHandler) { 507 TEST_F(InkDropLabelButtonTest, TargetEventHandler) {
508 View* target_view = widget_->GetRootView()->GetEventHandlerForPoint( 508 View* target_view = widget_->GetRootView()->GetEventHandlerForPoint(
509 button_->bounds().CenterPoint()); 509 button_->bounds().CenterPoint());
510 EXPECT_EQ(button_, target_view); 510 EXPECT_EQ(button_, target_view);
511 } 511 }
512 512
513 } // namespace views 513 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/label_button_border.h ('k') | ui/views/controls/button/md_text_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698