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

Unified Diff: content/browser/accessibility/dump_accessibility_tree_browsertest.cc

Issue 64273003: Add DumpAccessibilityTree tests for modal dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add android expectations Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/test/data/accessibility/dialog-expected-android.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/dump_accessibility_tree_browsertest.cc
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index d2d1134bf7c8c394a8dcea0963a30bef4f02e53f..45bf951a0ad18117a81bd3d42d5d9ce8f78e9f62 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -6,6 +6,7 @@
#include <string>
#include <vector>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
@@ -20,6 +21,7 @@
#include "content/port/browser/render_widget_host_view_port.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_paths.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/shell/browser/shell.h"
#include "content/test/accessibility_browser_test_utils.h"
@@ -119,6 +121,13 @@ class DumpAccessibilityTreeTest : public ContentBrowserTest {
}
}
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ ContentBrowserTest::SetUpCommandLine(command_line);
+ // Enable <dialog>, which is used in some tests.
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableExperimentalWebPlatformFeatures);
+ }
+
void RunTest(const base::FilePath::CharType* file_path);
};
@@ -410,6 +419,31 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityListMarkers) {
RunTest(FILE_PATH_LITERAL("list-markers.html"));
}
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityModalDialogClosed) {
+ RunTest(FILE_PATH_LITERAL("modal-dialog-closed.html"));
+}
+
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityModalDialogOpened) {
+ RunTest(FILE_PATH_LITERAL("modal-dialog-opened.html"));
+}
+
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityModalDialogInIframeClosed) {
+ RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-closed.html"));
+}
+
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityModalDialogInIframeOpened) {
+ RunTest(FILE_PATH_LITERAL("modal-dialog-in-iframe-opened.html"));
+}
+
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
+ AccessibilityModalDialogStack) {
+ RunTest(FILE_PATH_LITERAL("modal-dialog-stack.html"));
+}
+
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityP) {
RunTest(FILE_PATH_LITERAL("p.html"));
}
« no previous file with comments | « no previous file | content/test/data/accessibility/dialog-expected-android.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698