| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 } | 451 } |
| 452 | 452 |
| 453 void BlinkTestRunner::ShowDevTools(const std::string& settings, | 453 void BlinkTestRunner::ShowDevTools(const std::string& settings, |
| 454 const std::string& frontend_url) { | 454 const std::string& frontend_url) { |
| 455 Send(new ShellViewHostMsg_ShowDevTools( | 455 Send(new ShellViewHostMsg_ShowDevTools( |
| 456 routing_id(), settings, frontend_url)); | 456 routing_id(), settings, frontend_url)); |
| 457 } | 457 } |
| 458 | 458 |
| 459 void BlinkTestRunner::CloseDevTools() { | 459 void BlinkTestRunner::CloseDevTools() { |
| 460 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); | 460 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); |
| 461 WebDevToolsAgent* agent = | 461 render_view()->GetMainRenderFrame()->DetachDevToolsForTest(); |
| 462 render_view()->GetMainRenderFrame()->GetWebFrame()->DevToolsAgent(); | |
| 463 if (agent) | |
| 464 agent->Detach(); | |
| 465 } | 462 } |
| 466 | 463 |
| 467 void BlinkTestRunner::EvaluateInWebInspector(int call_id, | 464 void BlinkTestRunner::EvaluateInWebInspector(int call_id, |
| 468 const std::string& script) { | 465 const std::string& script) { |
| 469 Send(new ShellViewHostMsg_EvaluateInDevTools( | 466 Send(new ShellViewHostMsg_EvaluateInDevTools( |
| 470 routing_id(), call_id, script)); | 467 routing_id(), call_id, script)); |
| 471 } | 468 } |
| 472 | 469 |
| 473 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay( | 470 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay( |
| 474 const std::string& script) { | 471 const std::string& script) { |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 void BlinkTestRunner::ReportLeakDetectionResult( | 1060 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1064 const LeakDetectionResult& report) { | 1061 const LeakDetectionResult& report) { |
| 1065 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1062 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1066 } | 1063 } |
| 1067 | 1064 |
| 1068 void BlinkTestRunner::OnDestruct() { | 1065 void BlinkTestRunner::OnDestruct() { |
| 1069 delete this; | 1066 delete this; |
| 1070 } | 1067 } |
| 1071 | 1068 |
| 1072 } // namespace content | 1069 } // namespace content |
| OLD | NEW |