| Index: content/renderer/accessibility/render_accessibility_impl_browsertest.cc
|
| diff --git a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
|
| index d9c4d0058f3adfb09979c8c464624357ef291eeb..1a77980011de2d4b8899538ce2ae1d9e19649383 100644
|
| --- a/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
|
| +++ b/content/renderer/accessibility/render_accessibility_impl_browsertest.cc
|
| @@ -21,6 +21,7 @@
|
| #include "third_party/WebKit/public/platform/WebSize.h"
|
| #include "third_party/WebKit/public/web/WebAXObject.h"
|
| #include "third_party/WebKit/public/web/WebDocument.h"
|
| +#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
| #include "third_party/WebKit/public/web/WebView.h"
|
| #include "ui/accessibility/ax_node_data.h"
|
|
|
| @@ -96,8 +97,8 @@ class RenderAccessibilityImplTest : public RenderViewTest {
|
| protected:
|
| IPC::TestSink* sink_;
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImplTest);
|
| -
|
| };
|
|
|
| TEST_F(RenderAccessibilityImplTest, SendFullAccessibilityTreeOnReload) {
|
| @@ -125,7 +126,7 @@ TEST_F(RenderAccessibilityImplTest, SendFullAccessibilityTreeOnReload) {
|
| // If we post another event but the tree doesn't change,
|
| // we should only send 1 node to the browser.
|
| sink_->ClearMessages();
|
| - WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
|
| + WebDocument document = GetMainFrame()->GetDocument();
|
| WebAXObject root_obj = WebAXObject::FromWebDocument(document);
|
| accessibility->HandleAXEvent(
|
| root_obj,
|
| @@ -143,7 +144,7 @@ TEST_F(RenderAccessibilityImplTest, SendFullAccessibilityTreeOnReload) {
|
| // all 4 nodes to the browser. Also double-check that we didn't
|
| // leak any of the old BrowserTreeNodes.
|
| LoadHTML(html.c_str());
|
| - document = view()->GetWebView()->MainFrame()->GetDocument();
|
| + document = GetMainFrame()->GetDocument();
|
| root_obj = WebAXObject::FromWebDocument(document);
|
| sink_->ClearMessages();
|
| accessibility->HandleAXEvent(
|
| @@ -156,7 +157,7 @@ TEST_F(RenderAccessibilityImplTest, SendFullAccessibilityTreeOnReload) {
|
| // the root, the whole tree should be updated because we know
|
| // the browser doesn't have the root element.
|
| LoadHTML(html.c_str());
|
| - document = view()->GetWebView()->MainFrame()->GetDocument();
|
| + document = GetMainFrame()->GetDocument();
|
| root_obj = WebAXObject::FromWebDocument(document);
|
| sink_->ClearMessages();
|
| const WebAXObject& first_child = root_obj.ChildAt(0);
|
| @@ -187,7 +188,7 @@ TEST_F(RenderAccessibilityImplTest, HideAccessibilityObject) {
|
| accessibility->SendPendingAccessibilityEvents();
|
| EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser());
|
|
|
| - WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
|
| + WebDocument document = GetMainFrame()->GetDocument();
|
| WebAXObject root_obj = WebAXObject::FromWebDocument(document);
|
| WebAXObject node_a = root_obj.ChildAt(0);
|
| WebAXObject node_b = node_a.ChildAt(0);
|
| @@ -245,7 +246,7 @@ TEST_F(RenderAccessibilityImplTest, ShowAccessibilityObject) {
|
| ExecuteJavaScriptForTests("document.getElementById('B').offsetLeft;");
|
|
|
| sink_->ClearMessages();
|
| - WebDocument document = view()->GetWebView()->MainFrame()->GetDocument();
|
| + WebDocument document = GetMainFrame()->GetDocument();
|
| WebAXObject root_obj = WebAXObject::FromWebDocument(document);
|
| WebAXObject node_a = root_obj.ChildAt(0);
|
| WebAXObject node_b = node_a.ChildAt(0);
|
|
|