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

Side by Side Diff: ui/views/controls/styled_label_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/styled_label.cc ('k') | ui/views/controls/tabbed_pane/tabbed_pane.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 ASSERT_EQ(5, styled()->child_count()); 345 ASSERT_EQ(5, styled()->child_count());
346 EXPECT_EQ(0, styled()->child_at(0)->bounds().x()); 346 EXPECT_EQ(0, styled()->child_at(0)->bounds().x());
347 EXPECT_EQ(styled()->child_at(0)->bounds().right() - 2, 347 EXPECT_EQ(styled()->child_at(0)->bounds().right() - 2,
348 styled()->child_at(1)->bounds().x()); 348 styled()->child_at(1)->bounds().x());
349 EXPECT_EQ(0, styled()->child_at(2)->bounds().x()); 349 EXPECT_EQ(0, styled()->child_at(2)->bounds().x());
350 EXPECT_EQ(styled()->child_at(2)->bounds().right() - 2, 350 EXPECT_EQ(styled()->child_at(2)->bounds().right() - 2,
351 styled()->child_at(3)->bounds().x()); 351 styled()->child_at(3)->bounds().x());
352 EXPECT_EQ(0, styled()->child_at(4)->bounds().x()); 352 EXPECT_EQ(0, styled()->child_at(4)->bounds().x());
353 353
354 string16 tooltip; 354 base::string16 tooltip;
355 EXPECT_TRUE( 355 EXPECT_TRUE(
356 styled()->child_at(1)->GetTooltipText(gfx::Point(1, 1), &tooltip)); 356 styled()->child_at(1)->GetTooltipText(gfx::Point(1, 1), &tooltip));
357 EXPECT_EQ(ASCIIToUTF16("tooltip"), tooltip); 357 EXPECT_EQ(ASCIIToUTF16("tooltip"), tooltip);
358 EXPECT_TRUE( 358 EXPECT_TRUE(
359 styled()->child_at(2)->GetTooltipText(gfx::Point(1, 1), &tooltip)); 359 styled()->child_at(2)->GetTooltipText(gfx::Point(1, 1), &tooltip));
360 EXPECT_EQ(ASCIIToUTF16("tooltip"), tooltip); 360 EXPECT_EQ(ASCIIToUTF16("tooltip"), tooltip);
361 } 361 }
362 362
363 TEST_F(StyledLabelTest, HandleEmptyLayout) { 363 TEST_F(StyledLabelTest, HandleEmptyLayout) {
364 const std::string text("This is a test block of text, "); 364 const std::string text("This is a test block of text, ");
365 InitStyledLabel(text); 365 InitStyledLabel(text);
366 styled()->Layout(); 366 styled()->Layout();
367 ASSERT_EQ(0, styled()->child_count()); 367 ASSERT_EQ(0, styled()->child_count());
368 } 368 }
369 369
370 } // namespace 370 } // namespace
OLDNEW
« no previous file with comments | « ui/views/controls/styled_label.cc ('k') | ui/views/controls/tabbed_pane/tabbed_pane.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698