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

Side by Side Diff: ui/views/focus/focus_manager_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/examples/widget_example.cc ('k') | ui/views/focus/focus_traversal_unittest.cc » ('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) 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 <utility> 5 #include <utility>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "ui/base/accelerators/accelerator.h" 9 #include "ui/base/accelerators/accelerator.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 return new FocusManagerDtorTracked(widget, dtor_tracker_); 530 return new FocusManagerDtorTracked(widget, dtor_tracker_);
531 } 531 }
532 532
533 private: 533 private:
534 DtorTrackVector* dtor_tracker_; 534 DtorTrackVector* dtor_tracker_;
535 DISALLOW_COPY_AND_ASSIGN(TestFocusManagerFactory); 535 DISALLOW_COPY_AND_ASSIGN(TestFocusManagerFactory);
536 }; 536 };
537 537
538 class LabelButtonDtorTracked : public LabelButton { 538 class LabelButtonDtorTracked : public LabelButton {
539 public: 539 public:
540 LabelButtonDtorTracked(const string16& text, DtorTrackVector* dtor_tracker) 540 LabelButtonDtorTracked(const base::string16& text,
541 DtorTrackVector* dtor_tracker)
541 : LabelButton(NULL, text), 542 : LabelButton(NULL, text),
542 dtor_tracker_(dtor_tracker) { 543 dtor_tracker_(dtor_tracker) {
543 SetStyle(STYLE_NATIVE_TEXTBUTTON); 544 SetStyle(STYLE_NATIVE_TEXTBUTTON);
544 }; 545 };
545 virtual ~LabelButtonDtorTracked() { 546 virtual ~LabelButtonDtorTracked() {
546 dtor_tracker_->push_back("LabelButtonDtorTracked"); 547 dtor_tracker_->push_back("LabelButtonDtorTracked");
547 } 548 }
548 549
549 DtorTrackVector* dtor_tracker_; 550 DtorTrackVector* dtor_tracker_;
550 }; 551 };
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 EXPECT_EQ(view1, GetFocusManager()->GetFocusedView()); 905 EXPECT_EQ(view1, GetFocusManager()->GetFocusedView());
905 906
906 // Allow focus to go to the parent, and focus backwards which should now move 907 // Allow focus to go to the parent, and focus backwards which should now move
907 // up |widget_view| (in the parent). 908 // up |widget_view| (in the parent).
908 delegate->set_should_advance_focus_to_parent(true); 909 delegate->set_should_advance_focus_to_parent(true);
909 GetFocusManager()->AdvanceFocus(true); 910 GetFocusManager()->AdvanceFocus(true);
910 EXPECT_EQ(widget_view, GetFocusManager()->GetFocusedView()); 911 EXPECT_EQ(widget_view, GetFocusManager()->GetFocusedView());
911 } 912 }
912 913
913 } // namespace views 914 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/widget_example.cc ('k') | ui/views/focus/focus_traversal_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698