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

Side by Side Diff: chrome/browser/gtk/go_button_gtk_unittest.cc

Issue 67064: Implement tooltips for the Go/Stop button in Linux. (Closed)
Patch Set: Add a NULL check on location_bar_ for tests. Created 11 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
« no previous file with comments | « chrome/browser/gtk/go_button_gtk.cc ('k') | chrome/browser/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/go_button_gtk.h" 5 #include "chrome/browser/gtk/go_button_gtk.h"
6 #include "base/task.h" 6 #include "base/task.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 class GoButtonGtkPeer { 9 class GoButtonGtkPeer {
10 public: 10 public:
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 private: 37 private:
38 GoButtonGtk* const go_; 38 GoButtonGtk* const go_;
39 }; 39 };
40 40
41 namespace { 41 namespace {
42 42
43 class GoButtonGtkTest : public testing::Test { 43 class GoButtonGtkTest : public testing::Test {
44 protected: 44 protected:
45 GoButtonGtkTest() : go_(NULL), peer_(&go_) { } 45 GoButtonGtkTest() : go_(NULL, NULL), peer_(&go_) { }
46 46
47 protected: 47 protected:
48 GoButtonGtk go_; 48 GoButtonGtk go_;
49 GoButtonGtkPeer peer_; 49 GoButtonGtkPeer peer_;
50 }; 50 };
51 51
52 TEST_F(GoButtonGtkTest, ChangeModeGo) { 52 TEST_F(GoButtonGtkTest, ChangeModeGo) {
53 go_.ChangeMode(GoButtonGtk::MODE_GO); 53 go_.ChangeMode(GoButtonGtk::MODE_GO);
54 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.intended_mode()); 54 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.intended_mode());
55 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.visible_mode()); 55 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.visible_mode());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 TEST_F(GoButtonGtkTest, OnClickedStop) { 123 TEST_F(GoButtonGtkTest, OnClickedStop) {
124 peer_.set_visible_mode(GoButtonGtk::MODE_STOP); 124 peer_.set_visible_mode(GoButtonGtk::MODE_STOP);
125 EXPECT_TRUE(peer_.OnClicked()); 125 EXPECT_TRUE(peer_.OnClicked());
126 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.visible_mode()); 126 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.visible_mode());
127 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.intended_mode()); 127 EXPECT_EQ(GoButtonGtk::MODE_GO, peer_.intended_mode());
128 } 128 }
129 129
130 } // namespace 130 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/gtk/go_button_gtk.cc ('k') | chrome/browser/gtk/location_bar_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698