| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/ui/ash/accessibility/ax_tree_source_ash.h" | 9 #include "chrome/browser/ui/ash/accessibility/ax_tree_source_ash.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 count += GetSize(out_children[i]); | 37 count += GetSize(out_children[i]); |
| 38 | 38 |
| 39 return count; | 39 return count; |
| 40 } | 40 } |
| 41 | 41 |
| 42 class AXTreeSourceAshTest : public ash::test::AshTestBase { | 42 class AXTreeSourceAshTest : public ash::test::AshTestBase { |
| 43 public: | 43 public: |
| 44 AXTreeSourceAshTest() {} | 44 AXTreeSourceAshTest() {} |
| 45 virtual ~AXTreeSourceAshTest() {} | 45 virtual ~AXTreeSourceAshTest() {} |
| 46 | 46 |
| 47 virtual void SetUp() OVERRIDE { | 47 virtual void SetUp() override { |
| 48 AshTestBase::SetUp(); | 48 AshTestBase::SetUp(); |
| 49 | 49 |
| 50 widget_ = new Widget(); | 50 widget_ = new Widget(); |
| 51 Widget::InitParams init_params(Widget::InitParams::TYPE_POPUP); | 51 Widget::InitParams init_params(Widget::InitParams::TYPE_POPUP); |
| 52 init_params.parent = CurrentContext(); | 52 init_params.parent = CurrentContext(); |
| 53 widget_->Init(init_params); | 53 widget_->Init(init_params); |
| 54 | 54 |
| 55 content_ = new View(); | 55 content_ = new View(); |
| 56 widget_->SetContentsView(content_); | 56 widget_->SetContentsView(content_); |
| 57 | 57 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 // Grab a wrapper to focus. | 155 // Grab a wrapper to focus. |
| 156 AXAuraObjWrapper* textfield_wrapper = | 156 AXAuraObjWrapper* textfield_wrapper = |
| 157 AXAuraObjCache::GetInstance()->GetOrCreate(textfield_); | 157 AXAuraObjCache::GetInstance()->GetOrCreate(textfield_); |
| 158 | 158 |
| 159 // Focus and verify. | 159 // Focus and verify. |
| 160 ASSERT_FALSE(textfield_->HasFocus()); | 160 ASSERT_FALSE(textfield_->HasFocus()); |
| 161 textfield_wrapper->Focus(); | 161 textfield_wrapper->Focus(); |
| 162 ASSERT_TRUE(textfield_->HasFocus()); | 162 ASSERT_TRUE(textfield_->HasFocus()); |
| 163 } | 163 } |
| OLD | NEW |