Chromium Code Reviews| 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/webkit_test_runner.h" | 5 #include "content/shell/renderer/webkit_test_runner.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 if (!new_size.isEmpty()) | 358 if (!new_size.isEmpty()) |
| 359 ForceResizeRenderView(render_view(), new_size); | 359 ForceResizeRenderView(render_view(), new_size); |
| 360 } | 360 } |
| 361 | 361 |
| 362 void WebKitTestRunner::showDevTools() { | 362 void WebKitTestRunner::showDevTools() { |
| 363 Send(new ShellViewHostMsg_ShowDevTools(routing_id())); | 363 Send(new ShellViewHostMsg_ShowDevTools(routing_id())); |
| 364 } | 364 } |
| 365 | 365 |
| 366 void WebKitTestRunner::closeDevTools() { | 366 void WebKitTestRunner::closeDevTools() { |
| 367 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); | 367 Send(new ShellViewHostMsg_CloseDevTools(routing_id())); |
| 368 WebDevToolsAgent* agent = render_view()->GetWebView()->devToolsAgent(); | |
| 369 if (agent) | |
| 370 agent->detach(); | |
|
yurys
2013/06/06 09:28:23
How was it called before when front-end was closin
yurys
2013/06/06 09:35:41
Looks like WebDevToolsAgentImpl::detach() should c
| |
| 368 } | 371 } |
| 369 | 372 |
| 370 void WebKitTestRunner::evaluateInWebInspector(long call_id, | 373 void WebKitTestRunner::evaluateInWebInspector(long call_id, |
| 371 const std::string& script) { | 374 const std::string& script) { |
| 372 WebDevToolsAgent* agent = render_view()->GetWebView()->devToolsAgent(); | 375 WebDevToolsAgent* agent = render_view()->GetWebView()->devToolsAgent(); |
| 373 if (agent) | 376 if (agent) |
| 374 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); | 377 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); |
| 375 } | 378 } |
| 376 | 379 |
| 377 void WebKitTestRunner::clearAllDatabases() { | 380 void WebKitTestRunner::clearAllDatabases() { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 ->loadRequest(WebURLRequest(GURL("about:blank"))); | 721 ->loadRequest(WebURLRequest(GURL("about:blank"))); |
| 719 Send(new ShellViewHostMsg_ResetDone(routing_id())); | 722 Send(new ShellViewHostMsg_ResetDone(routing_id())); |
| 720 } | 723 } |
| 721 | 724 |
| 722 void WebKitTestRunner::OnNotifyDone() { | 725 void WebKitTestRunner::OnNotifyDone() { |
| 723 render_view()->GetWebView()->mainFrame()->executeScript( | 726 render_view()->GetWebView()->mainFrame()->executeScript( |
| 724 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); | 727 WebScriptSource(WebString::fromUTF8("testRunner.notifyDone();"))); |
| 725 } | 728 } |
| 726 | 729 |
| 727 } // namespace content | 730 } // namespace content |
| OLD | NEW |