| 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 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <clocale> | 9 #include <clocale> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 422 } |
| 423 | 423 |
| 424 void BlinkTestRunner::CloseDevTools() { | 424 void BlinkTestRunner::CloseDevTools() { |
| 425 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); | 425 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); |
| 426 WebDevToolsAgent* agent = | 426 WebDevToolsAgent* agent = |
| 427 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); | 427 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); |
| 428 if (agent) | 428 if (agent) |
| 429 agent->detach(); | 429 agent->detach(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void BlinkTestRunner::EvaluateInWebInspector(int call_id, | 432 void BlinkTestRunner::EvaluateInWebInspector(long call_id, |
| 433 const std::string& script) { | 433 const std::string& script) { |
| 434 Send(new ShellViewHostMsg_EvaluateInDevTools( | 434 WebDevToolsAgent* agent = |
| 435 routing_id(), call_id, script)); | 435 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); |
| 436 if (agent) |
| 437 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); |
| 436 } | 438 } |
| 437 | 439 |
| 438 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay( | 440 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay( |
| 439 const std::string& script) { | 441 const std::string& script) { |
| 440 WebDevToolsAgent* agent = | 442 WebDevToolsAgent* agent = |
| 441 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); | 443 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); |
| 442 if (!agent) | 444 if (!agent) |
| 443 return std::string(); | 445 return std::string(); |
| 444 | 446 |
| 445 return agent->evaluateInWebInspectorOverlay( | 447 return agent->evaluateInWebInspectorOverlay( |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 get_bluetooth_events_callbacks_.pop_front(); | 1011 get_bluetooth_events_callbacks_.pop_front(); |
| 1010 callback.Run(events); | 1012 callback.Run(events); |
| 1011 } | 1013 } |
| 1012 | 1014 |
| 1013 void BlinkTestRunner::ReportLeakDetectionResult( | 1015 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1014 const LeakDetectionResult& report) { | 1016 const LeakDetectionResult& report) { |
| 1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1017 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1016 } | 1018 } |
| 1017 | 1019 |
| 1018 } // namespace content | 1020 } // namespace content |
| OLD | NEW |