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

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, 7 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 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 2654
2655 textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); 2655 textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
2656 ui::AXViewState state_protected; 2656 ui::AXViewState state_protected;
2657 textfield_->GetAccessibleState(&state_protected); 2657 textfield_->GetAccessibleState(&state_protected);
2658 EXPECT_EQ(ui::AX_ROLE_TEXT_FIELD, state_protected.role); 2658 EXPECT_EQ(ui::AX_ROLE_TEXT_FIELD, state_protected.role);
2659 EXPECT_EQ(ASCIIToUTF16("********"), state_protected.value); 2659 EXPECT_EQ(ASCIIToUTF16("********"), state_protected.value);
2660 EXPECT_TRUE(state_protected.HasStateFlag(ui::AX_STATE_PROTECTED)); 2660 EXPECT_TRUE(state_protected.HasStateFlag(ui::AX_STATE_PROTECTED));
2661 } 2661 }
2662 2662
2663 } // namespace views 2663 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698