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

Side by Side Diff: content/browser/accessibility/dump_accessibility_browsertest_base.h

Issue 815463006: Separating ARIA, HTML & event AX test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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 | « no previous file | content/browser/accessibility/dump_accessibility_browsertest_base.cc » ('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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/browser/accessibility/accessibility_tree_formatter.h" 9 #include "content/browser/accessibility/accessibility_tree_formatter.h"
10 #include "content/public/test/content_browser_test.h" 10 #include "content/public/test/content_browser_test.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // Base class for an accessibility browsertest that takes an HTML file as 14 // Base class for an accessibility browsertest that takes an HTML file as
15 // input, loads it into a tab, dumps some accessibility data in text format, 15 // input, loads it into a tab, dumps some accessibility data in text format,
16 // then compares that text to an expectation file in the same directory. 16 // then compares that text to an expectation file in the same directory.
17 // 17 //
18 // The system was inspired by WebKit/Blink LayoutTests, but customized for 18 // The system was inspired by WebKit/Blink LayoutTests, but customized for
19 // testing accessibility in Chromium. 19 // testing accessibility in Chromium.
20 class DumpAccessibilityTestBase : public ContentBrowserTest { 20 class DumpAccessibilityTestBase : public ContentBrowserTest {
21 public: 21 public:
22 DumpAccessibilityTestBase(); 22 DumpAccessibilityTestBase();
23 virtual ~DumpAccessibilityTestBase(); 23 virtual ~DumpAccessibilityTestBase();
24 24
25 // Given a path to an HTML file relative to the test directory, 25 // Given a path to an HTML file relative to the test directory,
26 // loads the HTML, loads the accessibility tree, calls Dump(), then 26 // loads the HTML, loads the accessibility tree, calls Dump(), then
27 // compares the output to the expected result and has the test succeed 27 // compares the output to the expected result and has the test succeed
28 // or fail based on the diff. 28 // or fail based on the diff.
29 void RunTest(const base::FilePath::CharType* file_path); 29 void RunTest(const base::FilePath file_path, const char* file_dir);
30 void RunAriaTest(const base::FilePath::CharType* file_path);
31 void RunEventTest(const base::FilePath::CharType* file_path);
dmazzoni 2014/12/22 08:01:20 This doesn't belong in DumpAccessibilityTestBase,
shreeramk 2014/12/22 16:56:25 Oops sorry. Will take care in next patchset.
32 void RunHtmlTest(const base::FilePath::CharType* file_path);
30 33
31 protected: 34 protected:
32 // 35 //
33 // For subclasses to override: 36 // For subclasses to override:
34 // 37 //
35 38
36 // This is called by RunTest after the document has finished loading, 39 // This is called by RunTest after the document has finished loading,
37 // including the load complete accessibility event. The subclass should 40 // including the load complete accessibility event. The subclass should
38 // dump whatever that specific test wants to dump, returning the result 41 // dump whatever that specific test wants to dump, returning the result
39 // as a sequence of strings. 42 // as a sequence of strings.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void ParseHtmlForExtraDirectives( 84 void ParseHtmlForExtraDirectives(
82 const std::string& test_html, 85 const std::string& test_html,
83 std::vector<AccessibilityTreeFormatter::Filter>* filters, 86 std::vector<AccessibilityTreeFormatter::Filter>* filters,
84 std::string* wait_for); 87 std::string* wait_for);
85 88
86 // The default filters plus the filters loaded from the test file. 89 // The default filters plus the filters loaded from the test file.
87 std::vector<AccessibilityTreeFormatter::Filter> filters_; 90 std::vector<AccessibilityTreeFormatter::Filter> filters_;
88 }; 91 };
89 92
90 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/dump_accessibility_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698