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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 267003: LTTF: Print the element path in TestWebViewDelegate::decidePolicyForNavigation()... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate.cc
===================================================================
--- webkit/tools/test_shell/test_webview_delegate.cc (revision 28239)
+++ webkit/tools/test_shell/test_webview_delegate.cc (working copy)
@@ -632,13 +632,21 @@
WebNavigationPolicy TestWebViewDelegate::decidePolicyForNavigation(
WebFrame* frame, const WebURLRequest& request,
- WebNavigationType type, WebNavigationPolicy default_policy,
- bool is_redirect) {
+ WebNavigationType type, const WebNode& originating_node,
+ WebNavigationPolicy default_policy, bool is_redirect) {
WebNavigationPolicy result;
if (policy_delegate_enabled_) {
- printf("Policy delegate: attempt to load %s with navigation type '%s'\n",
+ printf("Policy delegate: attempt to load %s with navigation type '%s'",
GetURLDescription(request.url()).c_str(),
WebNavigationTypeToString(type));
+ WebNode node = originating_node;
+ if (!node.isNull()) {
+ printf(" originating from %s", node.nodeName().utf8().data());
+ for (node = node.parentNode(); !node.isNull(); node = node.parentNode()) {
+ printf(" > %s", node.nodeName().utf8().data());
+ }
+ }
+ printf("\n");
if (policy_delegate_is_permissive_) {
result = WebKit::WebNavigationPolicyCurrentTab;
} else {
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698