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

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

Issue 660633002: Fixed IAccessibleText::TextAtOffset with IA2_TEXT_BOUNDARY_WORD to return text that spans from the … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Broke up different boundary tests in their own test cases. Created 6 years, 1 month 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const char kSignalDiff[] = "*"; 47 const char kSignalDiff[] = "*";
48 48
49 } // namespace 49 } // namespace
50 50
51 typedef AccessibilityTreeFormatter::Filter Filter; 51 typedef AccessibilityTreeFormatter::Filter Filter;
52 52
53 // This test takes a snapshot of the platform BrowserAccessibility tree and 53 // This test takes a snapshot of the platform BrowserAccessibility tree and
54 // tests it against an expected baseline. 54 // tests it against an expected baseline.
55 // 55 //
56 // The flow of the test is as outlined below. 56 // The flow of the test is as outlined below.
57 // 1. Load an html file from chrome/test/data/accessibility. 57 // 1. Load an html file from content/test/data/accessibility.
58 // 2. Read the expectation. 58 // 2. Read the expectation.
59 // 3. Browse to the page and serialize the platform specific tree into a human 59 // 3. Browse to the page and serialize the platform specific tree into a human
60 // readable string. 60 // readable string.
61 // 4. Perform a comparison between actual and expected and fail if they do not 61 // 4. Perform a comparison between actual and expected and fail if they do not
62 // exactly match. 62 // exactly match.
63 class DumpAccessibilityTreeTest : public ContentBrowserTest { 63 class DumpAccessibilityTreeTest : public ContentBrowserTest {
64 public: 64 public:
65 // Utility helper that does a comment aware equality check. 65 // Utility helper that does a comment aware equality check.
66 // Returns array of lines from expected file which are different. 66 // Returns array of lines from expected file which are different.
67 std::vector<int> DiffLines(const std::vector<std::string>& expected_lines, 67 std::vector<int> DiffLines(const std::vector<std::string>& expected_lines,
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) { 1026 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityUl) {
1027 RunTest(FILE_PATH_LITERAL("ul.html")); 1027 RunTest(FILE_PATH_LITERAL("ul.html"));
1028 } 1028 }
1029 1029
1030 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) { 1030 IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityWbr) {
1031 RunTest(FILE_PATH_LITERAL("wbr.html")); 1031 RunTest(FILE_PATH_LITERAL("wbr.html"));
1032 } 1032 }
1033 1033
1034 } // namespace content 1034 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698