| OLD | NEW |
| 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 "content/shell/renderer/test_runner/AccessibilityController.h" | 9 #include "content/shell/renderer/test_runner/AccessibilityController.h" |
| 10 #include "content/shell/renderer/test_runner/EventSender.h" | 10 #include "content/shell/renderer/test_runner/EventSender.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "third_party/WebKit/public/web/WebDataSource.h" | 33 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 34 #include "third_party/WebKit/public/web/WebDocument.h" | 34 #include "third_party/WebKit/public/web/WebDocument.h" |
| 35 #include "third_party/WebKit/public/web/WebElement.h" | 35 #include "third_party/WebKit/public/web/WebElement.h" |
| 36 #include "third_party/WebKit/public/web/WebFrame.h" | 36 #include "third_party/WebKit/public/web/WebFrame.h" |
| 37 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 37 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 38 #include "third_party/WebKit/public/web/WebMIDIClientMock.h" | 38 #include "third_party/WebKit/public/web/WebMIDIClientMock.h" |
| 39 #include "third_party/WebKit/public/web/WebNode.h" | 39 #include "third_party/WebKit/public/web/WebNode.h" |
| 40 #include "third_party/WebKit/public/web/WebPluginParams.h" | 40 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 41 #include "third_party/WebKit/public/web/WebPrintParams.h" | 41 #include "third_party/WebKit/public/web/WebPrintParams.h" |
| 42 #include "third_party/WebKit/public/web/WebRange.h" | 42 #include "third_party/WebKit/public/web/WebRange.h" |
| 43 #include "third_party/WebKit/public/web/WebScriptController.h" | |
| 44 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 43 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| 45 #include "third_party/WebKit/public/web/WebView.h" | 44 #include "third_party/WebKit/public/web/WebView.h" |
| 46 | 45 |
| 47 using namespace blink; | 46 using namespace blink; |
| 48 using namespace std; | 47 using namespace std; |
| 49 | 48 |
| 50 namespace WebTestRunner { | 49 namespace WebTestRunner { |
| 51 | 50 |
| 52 namespace { | 51 namespace { |
| 53 | 52 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 void WebTestProxyBase::hideValidationMessage() | 464 void WebTestProxyBase::hideValidationMessage() |
| 466 { | 465 { |
| 467 } | 466 } |
| 468 | 467 |
| 469 void WebTestProxyBase::moveValidationMessage(const WebRect&) | 468 void WebTestProxyBase::moveValidationMessage(const WebRect&) |
| 470 { | 469 { |
| 471 } | 470 } |
| 472 | 471 |
| 473 string WebTestProxyBase::captureTree(bool debugRenderTree) | 472 string WebTestProxyBase::captureTree(bool debugRenderTree) |
| 474 { | 473 { |
| 475 WebScriptController::flushConsoleMessages(); | |
| 476 | |
| 477 bool shouldDumpAsText = m_testInterfaces->testRunner()->shouldDumpAsText(); | 474 bool shouldDumpAsText = m_testInterfaces->testRunner()->shouldDumpAsText(); |
| 478 bool shouldDumpAsMarkup = m_testInterfaces->testRunner()->shouldDumpAsMarkup
(); | 475 bool shouldDumpAsMarkup = m_testInterfaces->testRunner()->shouldDumpAsMarkup
(); |
| 479 bool shouldDumpAsPrinted = m_testInterfaces->testRunner()->isPrinting(); | 476 bool shouldDumpAsPrinted = m_testInterfaces->testRunner()->isPrinting(); |
| 480 WebFrame* frame = webView()->mainFrame(); | 477 WebFrame* frame = webView()->mainFrame(); |
| 481 string dataUtf8; | 478 string dataUtf8; |
| 482 if (shouldDumpAsText) { | 479 if (shouldDumpAsText) { |
| 483 bool recursive = m_testInterfaces->testRunner()->shouldDumpChildFramesAs
Text(); | 480 bool recursive = m_testInterfaces->testRunner()->shouldDumpChildFramesAs
Text(); |
| 484 dataUtf8 = shouldDumpAsPrinted ? dumpFramesAsPrintedText(frame, recursiv
e) : dumpFramesAsText(frame, recursive); | 481 dataUtf8 = shouldDumpAsPrinted ? dumpFramesAsPrintedText(frame, recursiv
e) : dumpFramesAsText(frame, recursive); |
| 485 } else if (shouldDumpAsMarkup) { | 482 } else if (shouldDumpAsMarkup) { |
| 486 // Append a newline for the test driver. | 483 // Append a newline for the test driver. |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 | 1349 |
| 1353 void WebTestProxyBase::resetInputMethod() | 1350 void WebTestProxyBase::resetInputMethod() |
| 1354 { | 1351 { |
| 1355 // If a composition text exists, then we need to let the browser process | 1352 // If a composition text exists, then we need to let the browser process |
| 1356 // to cancel the input method's ongoing composition session. | 1353 // to cancel the input method's ongoing composition session. |
| 1357 if (m_webWidget) | 1354 if (m_webWidget) |
| 1358 m_webWidget->confirmComposition(); | 1355 m_webWidget->confirmComposition(); |
| 1359 } | 1356 } |
| 1360 | 1357 |
| 1361 } | 1358 } |
| OLD | NEW |