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

Side by Side Diff: ui/accessibility/ax_text_utils_unittest.cc

Issue 1550483002: Switch to standard integer types in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-ui-events
Patch Set: Created 4 years, 12 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
« no previous file with comments | « ui/accessibility/ax_text_utils.h ('k') | ui/accessibility/ax_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h>
6
5 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
6 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/accessibility/ax_text_utils.h" 9 #include "ui/accessibility/ax_text_utils.h"
8 10
9 namespace ui { 11 namespace ui {
10 12
11 TEST(AXTextUtils, FindAccessibleTextBoundaryLine) { 13 TEST(AXTextUtils, FindAccessibleTextBoundaryLine) {
12 const base::string16 text = base::UTF8ToUTF16("Line 1.\nLine 2\n\t"); 14 const base::string16 text = base::UTF8ToUTF16("Line 1.\nLine 2\n\t");
13 const size_t text_length = text.length(); 15 const size_t text_length = text.length();
14 std::vector<int> line_start_offsets; 16 std::vector<int> line_start_offsets;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 EXPECT_EQ(0UL, result); 62 EXPECT_EQ(0UL, result);
61 63
62 // When we are at the start of the last line and we are searching forwards. 64 // When we are at the start of the last line and we are searching forwards.
63 // it should return the text length. 65 // it should return the text length.
64 result = FindAccessibleTextBoundary(text, line_start_offsets, LINE_BOUNDARY, 66 result = FindAccessibleTextBoundary(text, line_start_offsets, LINE_BOUNDARY,
65 15, FORWARDS_DIRECTION); 67 15, FORWARDS_DIRECTION);
66 EXPECT_EQ(text_length, result); 68 EXPECT_EQ(text_length, result);
67 } 69 }
68 70
69 } // Namespace ui. 71 } // Namespace ui.
OLDNEW
« no previous file with comments | « ui/accessibility/ax_text_utils.h ('k') | ui/accessibility/ax_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698