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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_unittest.cc

Issue 2759903002: Accessible bounds should include device scale factor on Windows. (Closed)
Patch Set: Rename to use_custom_device_scale_factor_for_testing Created 3 years, 9 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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 TestBrowserAccessibilityDelegate() 67 TestBrowserAccessibilityDelegate()
68 : got_fatal_error_(false) {} 68 : got_fatal_error_(false) {}
69 69
70 void AccessibilityPerformAction(const ui::AXActionData& data) override {} 70 void AccessibilityPerformAction(const ui::AXActionData& data) override {}
71 bool AccessibilityViewHasFocus() const override { return false; } 71 bool AccessibilityViewHasFocus() const override { return false; }
72 gfx::Rect AccessibilityGetViewBounds() const override { return gfx::Rect(); } 72 gfx::Rect AccessibilityGetViewBounds() const override { return gfx::Rect(); }
73 gfx::Point AccessibilityOriginInScreen( 73 gfx::Point AccessibilityOriginInScreen(
74 const gfx::Rect& bounds) const override { 74 const gfx::Rect& bounds) const override {
75 return gfx::Point(); 75 return gfx::Point();
76 } 76 }
77 float AccessibilityGetDeviceScaleFactor() const override { return 1.0f; }
77 void AccessibilityFatalError() override { got_fatal_error_ = true; } 78 void AccessibilityFatalError() override { got_fatal_error_ = true; }
78 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override { 79 gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() override {
79 return gfx::kNullAcceleratedWidget; 80 return gfx::kNullAcceleratedWidget;
80 } 81 }
81 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override { 82 gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override {
82 return nullptr; 83 return nullptr;
83 } 84 }
84 85
85 bool got_fatal_error() const { return got_fatal_error_; } 86 bool got_fatal_error() const { return got_fatal_error_; }
86 void reset_got_fatal_error() { got_fatal_error_ = false; } 87 void reset_got_fatal_error() { got_fatal_error_ = false; }
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_DOWNSTREAM)); 1649 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_DOWNSTREAM));
1649 1650
1650 // If the affinity is upstream, check that we get the second line. 1651 // If the affinity is upstream, check that we get the second line.
1651 ASSERT_EQ(0, static_text_accessible->GetLineStartBoundary( 1652 ASSERT_EQ(0, static_text_accessible->GetLineStartBoundary(
1652 4, ui::BACKWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); 1653 4, ui::BACKWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM));
1653 ASSERT_EQ(4, static_text_accessible->GetLineStartBoundary( 1654 ASSERT_EQ(4, static_text_accessible->GetLineStartBoundary(
1654 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM)); 1655 4, ui::FORWARDS_DIRECTION, ui::AX_TEXT_AFFINITY_UPSTREAM));
1655 } 1656 }
1656 1657
1657 } // namespace content 1658 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698