summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_webview_delegate.cc
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 04:27:39 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 04:27:39 +0000
commita9e8a092db75a1aff5e03d29215390ade65dec1e (patch)
tree005b922c452f4464324a56b0c2f183ef3d04d04d /webkit/tools/test_shell/test_webview_delegate.cc
parent3ae1feb620daffbdf65d4b11038268da2e14090e (diff)
downloadchromium_src-a9e8a092db75a1aff5e03d29215390ade65dec1e.zip
chromium_src-a9e8a092db75a1aff5e03d29215390ade65dec1e.tar.gz
chromium_src-a9e8a092db75a1aff5e03d29215390ade65dec1e.tar.bz2
Remove duplicated code in decidePolicyForNavigation().
BUG=none TEST=none; This makes no functional change. Review URL: http://codereview.chromium.org/300001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_webview_delegate.cc')
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 0ed4780..43922d6 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -636,12 +636,9 @@ WebNavigationPolicy TestWebViewDelegate::decidePolicyForNavigation(
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());
- }
+ if (!originating_node.isNull()) {
+ printf(" originating from %s",
+ GetNodeDescription(originating_node, 0).c_str());
}
printf("\n");
if (policy_delegate_is_permissive_) {