| OLD | NEW |
| 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 "components/html_viewer/ax_provider_impl.h" | 5 #include "components/html_viewer/ax_provider_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "components/html_viewer/blink_platform_impl.h" | 9 #include "components/html_viewer/blink_platform_impl.h" |
| 10 #include "components/scheduler/renderer/renderer_scheduler.h" | 10 #include "components/scheduler/renderer/renderer_scheduler.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // TODO(msw): This test crashes on Android; see http://crbug.com/486171 | 96 // TODO(msw): This test crashes on Android; see http://crbug.com/486171 |
| 97 #if defined(OS_ANDROID) | 97 #if defined(OS_ANDROID) |
| 98 #define MAYBE_Basic DISABLED_Basic | 98 #define MAYBE_Basic DISABLED_Basic |
| 99 #else | 99 #else |
| 100 #define MAYBE_Basic Basic | 100 #define MAYBE_Basic Basic |
| 101 #endif | 101 #endif |
| 102 TEST_F(AxProviderImplTest, MAYBE_Basic) { | 102 TEST_F(AxProviderImplTest, MAYBE_Basic) { |
| 103 TestWebViewClient web_view_client; | 103 TestWebViewClient web_view_client; |
| 104 TestWebFrameClient web_frame_client; | 104 TestWebFrameClient web_frame_client; |
| 105 WebView* view = WebView::create(&web_view_client); | 105 WebView* view = WebView::create(&web_view_client); |
| 106 view->setMainFrame(WebLocalFrame::create(&web_frame_client)); | 106 view->setMainFrame(WebLocalFrame::create(blink::WebTreeScopeType::Document, |
| 107 &web_frame_client)); |
| 107 view->mainFrame()->loadHTMLString( | 108 view->mainFrame()->loadHTMLString( |
| 108 WebData( | 109 WebData( |
| 109 "<html><body>foo<a " | 110 "<html><body>foo<a " |
| 110 "href='http://monkey.net'>bar</a>baz</body></html>"), | 111 "href='http://monkey.net'>bar</a>baz</body></html>"), |
| 111 WebURL(GURL("http://someplace.net"))); | 112 WebURL(GURL("http://someplace.net"))); |
| 112 base::MessageLoop::current()->Run(); | 113 base::MessageLoop::current()->Run(); |
| 113 | 114 |
| 114 html_viewer::AxProviderImpl ax_provider_impl(view); | 115 html_viewer::AxProviderImpl ax_provider_impl(view); |
| 115 NodeCatcher catcher; | 116 NodeCatcher catcher; |
| 116 ax_provider_impl.GetTree( | 117 ax_provider_impl.GetTree( |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 "", | 181 "", |
| 181 "")); | 182 "")); |
| 182 } | 183 } |
| 183 } | 184 } |
| 184 | 185 |
| 185 // TODO(aa): Test bounds. | 186 // TODO(aa): Test bounds. |
| 186 // TODO(aa): Test sibling ordering of foo/bar/baz. | 187 // TODO(aa): Test sibling ordering of foo/bar/baz. |
| 187 | 188 |
| 188 view->close(); | 189 view->close(); |
| 189 } | 190 } |
| OLD | NEW |