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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm

Issue 627043002: replace OVERRIDE and FINAL with override and final in chrome/browser/ui/[a-s]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/strings/string16.h" 6 #include "base/strings/string16.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" 9 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h"
10 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h" 10 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h"
11 #include "chrome/browser/ui/confirm_bubble_model.h" 11 #include "chrome/browser/ui/confirm_bubble_model.h"
12 #include "grit/theme_resources.h" 12 #include "grit/theme_resources.h"
13 #import "testing/gtest_mac.h" 13 #import "testing/gtest_mac.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 #import "ui/gfx/point.h" 15 #import "ui/gfx/point.h"
16 16
17 namespace { 17 namespace {
18 18
19 // The model object used in this test. This model implements all methods and 19 // The model object used in this test. This model implements all methods and
20 // updates its status when ConfirmBubbleController calls its methods. 20 // updates its status when ConfirmBubbleController calls its methods.
21 class TestConfirmBubbleModel : public ConfirmBubbleModel { 21 class TestConfirmBubbleModel : public ConfirmBubbleModel {
22 public: 22 public:
23 TestConfirmBubbleModel(bool* model_deleted, 23 TestConfirmBubbleModel(bool* model_deleted,
24 bool* accept_clicked, 24 bool* accept_clicked,
25 bool* cancel_clicked, 25 bool* cancel_clicked,
26 bool* link_clicked); 26 bool* link_clicked);
27 TestConfirmBubbleModel(); 27 TestConfirmBubbleModel();
28 virtual ~TestConfirmBubbleModel() OVERRIDE; 28 virtual ~TestConfirmBubbleModel() override;
29 virtual base::string16 GetTitle() const OVERRIDE; 29 virtual base::string16 GetTitle() const override;
30 virtual base::string16 GetMessageText() const OVERRIDE; 30 virtual base::string16 GetMessageText() const override;
31 virtual gfx::Image* GetIcon() const OVERRIDE; 31 virtual gfx::Image* GetIcon() const override;
32 virtual int GetButtons() const OVERRIDE; 32 virtual int GetButtons() const override;
33 virtual base::string16 GetButtonLabel(BubbleButton button) const OVERRIDE; 33 virtual base::string16 GetButtonLabel(BubbleButton button) const override;
34 virtual void Accept() OVERRIDE; 34 virtual void Accept() override;
35 virtual void Cancel() OVERRIDE; 35 virtual void Cancel() override;
36 virtual base::string16 GetLinkText() const OVERRIDE; 36 virtual base::string16 GetLinkText() const override;
37 virtual void LinkClicked() OVERRIDE; 37 virtual void LinkClicked() override;
38 38
39 private: 39 private:
40 bool* model_deleted_; 40 bool* model_deleted_;
41 bool* accept_clicked_; 41 bool* accept_clicked_;
42 bool* cancel_clicked_; 42 bool* cancel_clicked_;
43 bool* link_clicked_; 43 bool* link_clicked_;
44 }; 44 };
45 45
46 TestConfirmBubbleModel::TestConfirmBubbleModel(bool* model_deleted, 46 TestConfirmBubbleModel::TestConfirmBubbleModel(bool* model_deleted,
47 bool* accept_clicked, 47 bool* accept_clicked,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Click its link and verify this view has been removed from the test window. 185 // Click its link and verify this view has been removed from the test window.
186 // Also verify TestConfirmBubbleModel::LinkClicked() has been called. 186 // Also verify TestConfirmBubbleModel::LinkClicked() has been called.
187 [bubble clickLink]; 187 [bubble clickLink];
188 188
189 contains_bubble_view = [[view subviews] containsObject:bubble]; 189 contains_bubble_view = [[view subviews] containsObject:bubble];
190 EXPECT_FALSE(contains_bubble_view); 190 EXPECT_FALSE(contains_bubble_view);
191 EXPECT_FALSE(accept_clicked()); 191 EXPECT_FALSE(accept_clicked());
192 EXPECT_FALSE(cancel_clicked()); 192 EXPECT_FALSE(cancel_clicked());
193 EXPECT_TRUE(link_clicked()); 193 EXPECT_TRUE(link_clicked());
194 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/command_observer_bridge.h ('k') | chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698