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/webkit_test_runner.h" | 5 #include "content/shell/webkit_test_runner.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 Send(new ShellViewHostMsg_CloseWebInspector(routing_id())); | 321 Send(new ShellViewHostMsg_CloseWebInspector(routing_id())); |
322 } | 322 } |
323 | 323 |
324 void WebKitTestRunner::EvaluateInWebInspector(int32_t call_id, | 324 void WebKitTestRunner::EvaluateInWebInspector(int32_t call_id, |
325 const std::string& script) { | 325 const std::string& script) { |
326 WebDevToolsAgent* agent = render_view()->GetWebView()->devToolsAgent(); | 326 WebDevToolsAgent* agent = render_view()->GetWebView()->devToolsAgent(); |
327 if (agent) | 327 if (agent) |
328 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); | 328 agent->evaluateInWebInspector(call_id, WebString::fromUTF8(script)); |
329 } | 329 } |
330 | 330 |
| 331 void WebKitTestRunner::ExecCommand(const std::string& command, |
| 332 const std::string& value) { |
| 333 render_view()->GetWebView()->focusedFrame()->executeCommand( |
| 334 WebString::fromUTF8(command), WebString::fromUTF8(value)); |
| 335 } |
| 336 |
331 void WebKitTestRunner::NotImplemented(const std::string& object, | 337 void WebKitTestRunner::NotImplemented(const std::string& object, |
332 const std::string& method) { | 338 const std::string& method) { |
333 Send(new ShellViewHostMsg_NotImplemented(routing_id(), object, method)); | 339 Send(new ShellViewHostMsg_NotImplemented(routing_id(), object, method)); |
334 } | 340 } |
335 | 341 |
336 void WebKitTestRunner::Reset() { | 342 void WebKitTestRunner::Reset() { |
337 prefs_ = ShellWebPreferences(); | 343 prefs_ = ShellWebPreferences(); |
338 webkit_glue::WebPreferences prefs = render_view()->GetWebkitPreferences(); | 344 webkit_glue::WebPreferences prefs = render_view()->GetWebkitPreferences(); |
339 prefs_.Apply(&prefs); | 345 prefs_.Apply(&prefs); |
340 render_view()->SetWebkitPreferences(prefs); | 346 render_view()->SetWebkitPreferences(prefs); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 PaintRect(rect); | 466 PaintRect(rect); |
461 } | 467 } |
462 CHECK(proxy_->paintRect().isEmpty()); | 468 CHECK(proxy_->paintRect().isEmpty()); |
463 } | 469 } |
464 | 470 |
465 void WebKitTestRunner::DisplayRepaintMask() { | 471 void WebKitTestRunner::DisplayRepaintMask() { |
466 GetCanvas()->drawARGB(167, 0, 0, 0); | 472 GetCanvas()->drawARGB(167, 0, 0, 0); |
467 } | 473 } |
468 | 474 |
469 } // namespace content | 475 } // namespace content |
OLD | NEW |