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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1819243002: [DevTools] Use InspectorFrontendHost.readyForTest for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ready-for-test
Patch Set: resource-tree-reload.html fix Created 4 years, 9 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
OLDNEW
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
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(long call_id, 432 void BlinkTestRunner::EvaluateInWebInspector(int call_id,
433 const std::string& script) { 433 const std::string& script) {
434 WebDevToolsAgent* agent = 434 Send(new ShellViewHostMsg_EvaluateInDevTools(
435 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); 435 routing_id(), call_id, script));
436 if (agent)
437 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script));
438 } 436 }
439 437
440 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay( 438 std::string BlinkTestRunner::EvaluateInWebInspectorOverlay(
441 const std::string& script) { 439 const std::string& script) {
442 WebDevToolsAgent* agent = 440 WebDevToolsAgent* agent =
443 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent(); 441 render_view()->GetMainRenderFrame()->GetWebFrame()->devToolsAgent();
444 if (!agent) 442 if (!agent)
445 return std::string(); 443 return std::string();
446 444
447 return agent->evaluateInWebInspectorOverlay( 445 return agent->evaluateInWebInspectorOverlay(
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 get_bluetooth_events_callbacks_.pop_front(); 1009 get_bluetooth_events_callbacks_.pop_front();
1012 callback.Run(events); 1010 callback.Run(events);
1013 } 1011 }
1014 1012
1015 void BlinkTestRunner::ReportLeakDetectionResult( 1013 void BlinkTestRunner::ReportLeakDetectionResult(
1016 const LeakDetectionResult& report) { 1014 const LeakDetectionResult& report) {
1017 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1018 } 1016 }
1019 1017
1020 } // namespace content 1018 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698