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

Side by Side Diff: ui/views/controls/progress_bar_unittest.cc

Issue 117983002: Prefix string16 with base:: in ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/progress_bar.h" 5 #include "ui/views/controls/progress_bar.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/base/accessibility/accessible_view_state.h" 9 #include "ui/base/accessibility/accessible_view_state.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 TEST(ProgressBarTest, TooltipTextProperty) { 13 TEST(ProgressBarTest, TooltipTextProperty) {
14 ProgressBar bar; 14 ProgressBar bar;
15 string16 tooltip = ASCIIToUTF16("Some text"); 15 base::string16 tooltip = ASCIIToUTF16("Some text");
16 EXPECT_FALSE(bar.GetTooltipText(gfx::Point(), &tooltip)); 16 EXPECT_FALSE(bar.GetTooltipText(gfx::Point(), &tooltip));
17 EXPECT_EQ(string16(), tooltip); 17 EXPECT_EQ(base::string16(), tooltip);
18 string16 tooltip_text = ASCIIToUTF16("My progress"); 18 base::string16 tooltip_text = ASCIIToUTF16("My progress");
19 bar.SetTooltipText(tooltip_text); 19 bar.SetTooltipText(tooltip_text);
20 EXPECT_TRUE(bar.GetTooltipText(gfx::Point(), &tooltip)); 20 EXPECT_TRUE(bar.GetTooltipText(gfx::Point(), &tooltip));
21 EXPECT_EQ(tooltip_text, tooltip); 21 EXPECT_EQ(tooltip_text, tooltip);
22 } 22 }
23 23
24 TEST(ProgressBarTest, Accessibility) { 24 TEST(ProgressBarTest, Accessibility) {
25 ProgressBar bar; 25 ProgressBar bar;
26 bar.SetValue(62); 26 bar.SetValue(62);
27 27
28 ui::AccessibleViewState state; 28 ui::AccessibleViewState state;
29 bar.GetAccessibleState(&state); 29 bar.GetAccessibleState(&state);
30 EXPECT_EQ(ui::AccessibilityTypes::ROLE_PROGRESSBAR, state.role); 30 EXPECT_EQ(ui::AccessibilityTypes::ROLE_PROGRESSBAR, state.role);
31 EXPECT_EQ(string16(), state.name); 31 EXPECT_EQ(base::string16(), state.name);
32 EXPECT_TRUE(ui::AccessibilityTypes::STATE_READONLY & state.state); 32 EXPECT_TRUE(ui::AccessibilityTypes::STATE_READONLY & state.state);
33 } 33 }
34 34
35 } // namespace views 35 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698