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 "content/browser/accessibility/dump_accessibility_browsertest_base.h" | 5 #include "content/browser/accessibility/dump_accessibility_browsertest_base.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // | 260 // |
261 // In this scenario, B's contentWindow.location.href matches A's url, | 261 // In this scenario, B's contentWindow.location.href matches A's url, |
262 // but B's url in the browser frame tree is still "about:blank". | 262 // but B's url in the browser frame tree is still "about:blank". |
263 std::string url = node->current_url().spec(); | 263 std::string url = node->current_url().spec(); |
264 if (url != url::kAboutBlankURL) | 264 if (url != url::kAboutBlankURL) |
265 all_frame_urls.push_back(url); | 265 all_frame_urls.push_back(url); |
266 | 266 |
267 // We won't get the correct coordinate transformations for | 267 // We won't get the correct coordinate transformations for |
268 // out-of-process iframes until each frame's surface is ready. | 268 // out-of-process iframes until each frame's surface is ready. |
269 RenderFrameHostImpl* current_frame_host = node->current_frame_host(); | 269 RenderFrameHostImpl* current_frame_host = node->current_frame_host(); |
270 if (!current_frame_host) | 270 if (!current_frame_host || !current_frame_host->is_local_root()) |
271 continue; | 271 continue; |
272 RenderWidgetHostImpl* rwh = current_frame_host->GetRenderWidgetHost(); | 272 RenderWidgetHostViewBase* rwhv = |
273 if (!rwh) | 273 static_cast<RenderWidgetHostViewBase*>(current_frame_host->GetView()); |
274 continue; | |
275 RenderWidgetHostViewBase* rwhv = rwh->GetView(); | |
276 if (rwhv && rwhv->IsChildFrameForTesting()) { | 274 if (rwhv && rwhv->IsChildFrameForTesting()) { |
277 SurfaceHitTestReadyNotifier notifier( | 275 SurfaceHitTestReadyNotifier notifier( |
278 static_cast<RenderWidgetHostViewChildFrame*>(rwhv)); | 276 static_cast<RenderWidgetHostViewChildFrame*>(rwhv)); |
279 notifier.WaitForSurfaceReady(); | 277 notifier.WaitForSurfaceReady(); |
280 } | 278 } |
281 } | 279 } |
282 | 280 |
283 // Wait for the accessibility tree to fully load for all frames, | 281 // Wait for the accessibility tree to fully load for all frames, |
284 // by searching for the WEB_AREA node in the accessibility tree | 282 // by searching for the WEB_AREA node in the accessibility tree |
285 // with the url of each frame in our frame tree. Note that this | 283 // with the url of each frame in our frame tree. Note that this |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 expected_file, actual_contents.c_str(), actual_contents.size())); | 384 expected_file, actual_contents.c_str(), actual_contents.size())); |
387 LOG(INFO) << "Wrote expectations to: " | 385 LOG(INFO) << "Wrote expectations to: " |
388 << expected_file.LossyDisplayName(); | 386 << expected_file.LossyDisplayName(); |
389 } | 387 } |
390 } else { | 388 } else { |
391 LOG(INFO) << "Test output matches expectations."; | 389 LOG(INFO) << "Test output matches expectations."; |
392 } | 390 } |
393 } | 391 } |
394 | 392 |
395 } // namespace content | 393 } // namespace content |
OLD | NEW |