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

Side by Side Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 base::WeakPtrFactory<TestTextfield> weak_ptr_factory_; 300 base::WeakPtrFactory<TestTextfield> weak_ptr_factory_;
301 301
302 DISALLOW_COPY_AND_ASSIGN(TestTextfield); 302 DISALLOW_COPY_AND_ASSIGN(TestTextfield);
303 }; 303 };
304 304
305 // Convenience to make constructing a GestureEvent simpler. 305 // Convenience to make constructing a GestureEvent simpler.
306 class GestureEventForTest : public ui::GestureEvent { 306 class GestureEventForTest : public ui::GestureEvent {
307 public: 307 public:
308 GestureEventForTest(int x, int y, ui::GestureEventDetails details) 308 GestureEventForTest(int x, int y, ui::GestureEventDetails details)
309 : GestureEvent(x, y, 0, base::TimeDelta(), details) {} 309 : GestureEvent(x, y, 0, base::TimeTicks(), details) {}
310 310
311 private: 311 private:
312 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); 312 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest);
313 }; 313 };
314 314
315 // This controller will happily destroy the target textfield passed on 315 // This controller will happily destroy the target textfield passed on
316 // construction when a key event is triggered. 316 // construction when a key event is triggered.
317 class TextfieldDestroyerController : public views::TextfieldController { 317 class TextfieldDestroyerController : public views::TextfieldController {
318 public: 318 public:
319 explicit TextfieldDestroyerController(views::Textfield* target) 319 explicit TextfieldDestroyerController(views::Textfield* target)
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 2658
2659 textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); 2659 textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
2660 ui::AXViewState state_protected; 2660 ui::AXViewState state_protected;
2661 textfield_->GetAccessibleState(&state_protected); 2661 textfield_->GetAccessibleState(&state_protected);
2662 EXPECT_EQ(ui::AX_ROLE_TEXT_FIELD, state_protected.role); 2662 EXPECT_EQ(ui::AX_ROLE_TEXT_FIELD, state_protected.role);
2663 EXPECT_EQ(ASCIIToUTF16("********"), state_protected.value); 2663 EXPECT_EQ(ASCIIToUTF16("********"), state_protected.value);
2664 EXPECT_TRUE(state_protected.HasStateFlag(ui::AX_STATE_PROTECTED)); 2664 EXPECT_TRUE(state_protected.HasStateFlag(ui::AX_STATE_PROTECTED));
2665 } 2665 }
2666 2666
2667 } // namespace views 2667 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/corewm/desktop_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698