| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|