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

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

Issue 2023453003: Make RenderFrameHostImpl::GetRenderWidgetHost() always return an object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Need a cast in test Created 4 years, 6 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 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
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());
Charlie Reis 2016/05/27 22:50:28 Sanity check: Before, this code skipped frames tha
kenrb 2016/05/30 19:39:53 Good point, fixed it to match the old behavior.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698