Commit 6b6c0c39 authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Strengthened and cleaned up character bounds tests

In preparation for a big refactoring of our logic that computes character and object bounds.

Important changes:
1. Wrote additional tests for scrollable editables and strengthened test for scrollable containers.
2. Tests that the height is the same across lines.

More cosmetic changes:
3. Replaced all-caps constants with newer style guide constants that start with "k".
4. Used raw litteral strings (a C++ 11) feature that allows the use of quotes in HTML code without escaping or the need to remember to use single quotes.
5. Split SetUp methods into more helper functions.
6. Introduced SetUp method for creating scrollable input field and added a test for it.
7. Stopped using net::EscapeQueryParamString because it was not appropriate for escaping HTML code.
R=aleventhal@chromium.org, dmazzoni@chromium.org

Change-Id: I7d9387323ae35a353dc62096c151355897f925eb
Reviewed-on: https://chromium-review.googlesource.com/1030842
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554462}
parent 5755187e
...@@ -937,21 +937,21 @@ void BlinkAXTreeSource::SerializeNode(WebAXObject src, ...@@ -937,21 +937,21 @@ void BlinkAXTreeSource::SerializeNode(WebAXObject src,
} }
if (src.IsScrollableContainer()) { if (src.IsScrollableContainer()) {
const gfx::Point& scrollOffset = src.GetScrollOffset(); const gfx::Point& scroll_offset = src.GetScrollOffset();
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollX, scrollOffset.x()); dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollX, scroll_offset.x());
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollY, scrollOffset.y()); dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollY, scroll_offset.y());
const gfx::Point& minScrollOffset = src.MinimumScrollOffset(); const gfx::Point& min_scroll_offset = src.MinimumScrollOffset();
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollXMin, dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollXMin,
minScrollOffset.x()); min_scroll_offset.x());
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollYMin, dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollYMin,
minScrollOffset.y()); min_scroll_offset.y());
const gfx::Point& maxScrollOffset = src.MaximumScrollOffset(); const gfx::Point& max_scroll_offset = src.MaximumScrollOffset();
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollXMax, dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollXMax,
maxScrollOffset.x()); max_scroll_offset.x());
dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollYMax, dst->AddIntAttribute(ax::mojom::IntAttribute::kScrollYMax,
maxScrollOffset.y()); max_scroll_offset.y());
} }
if (dst->id == image_data_node_id_) { if (dst->id == image_data_node_id_) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment