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

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

Issue 2838293002: Ensure all content_browsertests call the host resolver in SetUpOnMainThread and not after. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/test/content_browser_test.h" 8 #include "content/public/test/content_browser_test.h"
9 #include "content/public/test/content_browser_test_utils.h" 9 #include "content/public/test/content_browser_test_utils.h"
10 #include "content/public/test/test_utils.h" 10 #include "content/public/test/test_utils.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ASSERT_NE(nullptr, root); 86 ASSERT_NE(nullptr, root);
87 ASSERT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, root->data().role); 87 ASSERT_EQ(ui::AX_ROLE_ROOT_WEB_AREA, root->data().role);
88 ui::AXNode* group = root->ChildAtIndex(0); 88 ui::AXNode* group = root->ChildAtIndex(0);
89 ASSERT_EQ(ui::AX_ROLE_GROUP, group->data().role); 89 ASSERT_EQ(ui::AX_ROLE_GROUP, group->data().role);
90 ui::AXNode* button = group->ChildAtIndex(0); 90 ui::AXNode* button = group->ChildAtIndex(0);
91 ASSERT_EQ(ui::AX_ROLE_BUTTON, button->data().role); 91 ASSERT_EQ(ui::AX_ROLE_BUTTON, button->data().role);
92 } 92 }
93 93
94 IN_PROC_BROWSER_TEST_F(SnapshotAXTreeBrowserTest, 94 IN_PROC_BROWSER_TEST_F(SnapshotAXTreeBrowserTest,
95 SnapshotAccessibilityTreeFromMultipleFrames) { 95 SnapshotAccessibilityTreeFromMultipleFrames) {
96 host_resolver()->AddRule("*", "127.0.0.1");
97 ASSERT_TRUE(embedded_test_server()->Start()); 96 ASSERT_TRUE(embedded_test_server()->Start());
98 97
99 NavigateToURL(shell(), embedded_test_server()->GetURL( 98 NavigateToURL(shell(), embedded_test_server()->GetURL(
100 "/accessibility/snapshot/outer.html")); 99 "/accessibility/snapshot/outer.html"));
101 100
102 WebContentsImpl* web_contents = 101 WebContentsImpl* web_contents =
103 static_cast<WebContentsImpl*>(shell()->web_contents()); 102 static_cast<WebContentsImpl*>(shell()->web_contents());
104 FrameTreeNode* root_frame = web_contents->GetFrameTree()->root(); 103 FrameTreeNode* root_frame = web_contents->GetFrameTree()->root();
105 104
106 NavigateFrameToURL(root_frame->child_at(0), GURL("data:text/plain,Alpha")); 105 NavigateFrameToURL(root_frame->child_at(0), GURL("data:text/plain,Alpha"));
(...skipping 28 matching lines...) Expand all
135 " group\n" 134 " group\n"
136 " button 'Inside Before'\n" 135 " button 'Inside Before'\n"
137 " iframe\n" 136 " iframe\n"
138 " rootWebArea\n" 137 " rootWebArea\n"
139 " button 'Inside After'\n" 138 " button 'Inside After'\n"
140 " button 'After'\n", 139 " button 'After'\n",
141 dump); 140 dump);
142 } 141 }
143 142
144 } // namespace content 143 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698