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

Side by Side Diff: content/shell/renderer/test_runner/WebTestProxy.cpp

Issue 200663002: Add 'waitUntilExternalURLLoad' method to TestRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revive Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/WebTestProxy.h" 5 #include "content/shell/renderer/test_runner/WebTestProxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/shell/renderer/test_runner/event_sender.h" 10 #include "content/shell/renderer/test_runner/event_sender.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 void WebTestProxyBase::didCloseChooser() 1029 void WebTestProxyBase::didCloseChooser()
1030 { 1030 {
1031 m_chooserCount--; 1031 m_chooserCount--;
1032 } 1032 }
1033 1033
1034 bool WebTestProxyBase::isChooserShown() 1034 bool WebTestProxyBase::isChooserShown()
1035 { 1035 {
1036 return 0 < m_chooserCount; 1036 return 0 < m_chooserCount;
1037 } 1037 }
1038 1038
1039 void WebTestProxyBase::loadURLExternally(WebLocalFrame* frame, const WebURLReque st& request, WebNavigationPolicy policy, const WebString& suggested_name)
1040 {
1041 if (m_testInterfaces->testRunner()->shouldWaitUntilExternalURLLoad()) {
1042 if (policy == WebNavigationPolicyDownload) {
1043 m_delegate->printMessage(string("Downloading URL with suggested file name \"") + suggested_name.utf8() + "\"\n");
1044 } else {
1045 m_delegate->printMessage(string("Loading URL externally - \"") + URL Description(request.url()) + "\"\n");
1046 }
1047 m_delegate->testFinished();
1048 }
1049 }
1050
1039 void WebTestProxyBase::didStartProvisionalLoad(WebLocalFrame* frame) 1051 void WebTestProxyBase::didStartProvisionalLoad(WebLocalFrame* frame)
1040 { 1052 {
1041 if (!m_testInterfaces->testRunner()->topLoadingFrame()) 1053 if (!m_testInterfaces->testRunner()->topLoadingFrame())
1042 m_testInterfaces->testRunner()->setTopLoadingFrame(frame, false); 1054 m_testInterfaces->testRunner()->setTopLoadingFrame(frame, false);
1043 1055
1044 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) { 1056 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) {
1045 printFrameDescription(m_delegate, frame); 1057 printFrameDescription(m_delegate, frame);
1046 m_delegate->printMessage(" - didStartProvisionalLoadForFrame\n"); 1058 m_delegate->printMessage(" - didStartProvisionalLoadForFrame\n");
1047 } 1059 }
1048 1060
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1364
1353 void WebTestProxyBase::resetInputMethod() 1365 void WebTestProxyBase::resetInputMethod()
1354 { 1366 {
1355 // If a composition text exists, then we need to let the browser process 1367 // If a composition text exists, then we need to let the browser process
1356 // to cancel the input method's ongoing composition session. 1368 // to cancel the input method's ongoing composition session.
1357 if (m_webWidget) 1369 if (m_webWidget)
1358 m_webWidget->confirmComposition(); 1370 m_webWidget->confirmComposition();
1359 } 1371 }
1360 1372
1361 } // namespace content 1373 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698