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

Side by Side Diff: ui/views/controls/menu/menu_runner_unittest.cc

Issue 2926553004: Remove trailing semicolon at the end of a method definition (Closed)
Patch Set: rebase Created 3 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 | « ui/views/controls/combobox/combobox_unittest.cc ('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 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 "ui/views/controls/menu/menu_runner.h" 5 #include "ui/views/controls/menu/menu_runner.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 15 matching lines...) Expand all
26 #include "ui/views/widget/native_widget_private.h" 26 #include "ui/views/widget/native_widget_private.h"
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 28
29 namespace { 29 namespace {
30 30
31 // Accepts a MenuRunnerImpl to release when this is. Simulates shutdown 31 // Accepts a MenuRunnerImpl to release when this is. Simulates shutdown
32 // occurring immediately during the release of ViewsDelegate. 32 // occurring immediately during the release of ViewsDelegate.
33 class DeletingTestViewsDelegate : public views::TestViewsDelegate { 33 class DeletingTestViewsDelegate : public views::TestViewsDelegate {
34 public: 34 public:
35 DeletingTestViewsDelegate() : menu_runner_(nullptr) {} 35 DeletingTestViewsDelegate() : menu_runner_(nullptr) {}
36 ~DeletingTestViewsDelegate() override{}; 36 ~DeletingTestViewsDelegate() override {}
37 37
38 void set_menu_runner(views::internal::MenuRunnerImpl* menu_runner) { 38 void set_menu_runner(views::internal::MenuRunnerImpl* menu_runner) {
39 menu_runner_ = menu_runner; 39 menu_runner_ = menu_runner;
40 } 40 }
41 41
42 // views::ViewsDelegate: 42 // views::ViewsDelegate:
43 void ReleaseRef() override; 43 void ReleaseRef() override;
44 44
45 private: 45 private:
46 // Not owned, deletes itself. 46 // Not owned, deletes itself.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 // This will release the ref on ViewsDelegate. The test version will release 482 // This will release the ref on ViewsDelegate. The test version will release
483 // |menu_runner| simulating device shutdown. 483 // |menu_runner| simulating device shutdown.
484 menu_controller.controller()->CancelAll(); 484 menu_controller.controller()->CancelAll();
485 // Both the |menu_runner| and |menu_controller| should have been deleted. 485 // Both the |menu_runner| and |menu_controller| should have been deleted.
486 EXPECT_EQ(nullptr, ref); 486 EXPECT_EQ(nullptr, ref);
487 EXPECT_EQ(nullptr, menu_controller.controller()); 487 EXPECT_EQ(nullptr, menu_controller.controller());
488 } 488 }
489 489
490 } // namespace test 490 } // namespace test
491 } // namespace views 491 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698