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

Side by Side Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 1129203005: Also report navigation policy for createView if requested (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shell/renderer/test_runner/web_test_proxy.h" 5 #include "content/shell/renderer/test_runner/web_test_proxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 delegate_->PrintMessage( 894 delegate_->PrintMessage(
895 "EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n"); 895 "EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n");
896 } 896 }
897 897
898 bool WebTestProxyBase::CreateView(blink::WebLocalFrame* frame, 898 bool WebTestProxyBase::CreateView(blink::WebLocalFrame* frame,
899 const blink::WebURLRequest& request, 899 const blink::WebURLRequest& request,
900 const blink::WebWindowFeatures& features, 900 const blink::WebWindowFeatures& features,
901 const blink::WebString& frame_name, 901 const blink::WebString& frame_name,
902 blink::WebNavigationPolicy policy, 902 blink::WebNavigationPolicy policy,
903 bool suppress_opener) { 903 bool suppress_opener) {
904 if (test_interfaces_->GetTestRunner()->shouldDumpNavigationPolicy()) {
905 delegate_->PrintMessage("Default policy for createView for '" +
906 URLDescription(request.url()) + "' is '" +
907 WebNavigationPolicyToString(policy) + "'\n");
908 }
909
904 if (!test_interfaces_->GetTestRunner()->canOpenWindows()) 910 if (!test_interfaces_->GetTestRunner()->canOpenWindows())
905 return false; 911 return false;
906 if (test_interfaces_->GetTestRunner()->shouldDumpCreateView()) 912 if (test_interfaces_->GetTestRunner()->shouldDumpCreateView())
907 delegate_->PrintMessage(std::string("createView(") + 913 delegate_->PrintMessage(std::string("createView(") +
908 URLDescription(request.url()) + ")\n"); 914 URLDescription(request.url()) + ")\n");
909 return true; 915 return true;
910 } 916 }
911 917
912 blink::WebPlugin* WebTestProxyBase::CreatePlugin( 918 blink::WebPlugin* WebTestProxyBase::CreatePlugin(
913 blink::WebLocalFrame* frame, 919 blink::WebLocalFrame* frame,
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 // to cancel the input method's ongoing composition session. 1395 // to cancel the input method's ongoing composition session.
1390 if (web_widget_) 1396 if (web_widget_)
1391 web_widget_->confirmComposition(); 1397 web_widget_->confirmComposition();
1392 } 1398 }
1393 1399
1394 blink::WebString WebTestProxyBase::acceptLanguages() { 1400 blink::WebString WebTestProxyBase::acceptLanguages() {
1395 return blink::WebString::fromUTF8(accept_languages_); 1401 return blink::WebString::fromUTF8(accept_languages_);
1396 } 1402 }
1397 1403
1398 } // namespace content 1404 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698