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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 Send(new ShellViewHostMsg_SendBluetoothManualChooserEvent(routing_id(), event, | 529 Send(new ShellViewHostMsg_SendBluetoothManualChooserEvent(routing_id(), event, |
530 argument)); | 530 argument)); |
531 } | 531 } |
532 | 532 |
533 void BlinkTestRunner::SetFocus(blink::WebView* web_view, bool focus) { | 533 void BlinkTestRunner::SetFocus(blink::WebView* web_view, bool focus) { |
534 RenderView* render_view = RenderView::FromWebView(web_view); | 534 RenderView* render_view = RenderView::FromWebView(web_view); |
535 if (render_view) // Check whether |web_view| has been already closed. | 535 if (render_view) // Check whether |web_view| has been already closed. |
536 SetFocusAndActivate(render_view, focus); | 536 SetFocusAndActivate(render_view, focus); |
537 } | 537 } |
538 | 538 |
539 void BlinkTestRunner::SetAcceptAllCookies(bool accept) { | 539 void BlinkTestRunner::SetBlockThirdPartyCookies(bool block) { |
540 Send(new LayoutTestHostMsg_AcceptAllCookies(routing_id(), accept)); | 540 Send(new LayoutTestHostMsg_BlockThirdPartyCookies(routing_id(), block)); |
541 } | 541 } |
542 | 542 |
543 std::string BlinkTestRunner::PathToLocalResource(const std::string& resource) { | 543 std::string BlinkTestRunner::PathToLocalResource(const std::string& resource) { |
544 #if defined(OS_WIN) | 544 #if defined(OS_WIN) |
545 if (resource.find("/tmp/") == 0) { | 545 if (resource.find("/tmp/") == 0) { |
546 // We want a temp file. | 546 // We want a temp file. |
547 GURL base_url = net::FilePathToFileURL(test_config_.temp_path); | 547 GURL base_url = net::FilePathToFileURL(test_config_.temp_path); |
548 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec(); | 548 return base_url.Resolve(resource.substr(strlen("/tmp/"))).spec(); |
549 } | 549 } |
550 #endif | 550 #endif |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 void BlinkTestRunner::ReportLeakDetectionResult( | 1013 void BlinkTestRunner::ReportLeakDetectionResult( |
1014 const LeakDetectionResult& report) { | 1014 const LeakDetectionResult& report) { |
1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1015 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1016 } | 1016 } |
1017 | 1017 |
1018 void BlinkTestRunner::OnDestruct() { | 1018 void BlinkTestRunner::OnDestruct() { |
1019 delete this; | 1019 delete this; |
1020 } | 1020 } |
1021 | 1021 |
1022 } // namespace content | 1022 } // namespace content |
OLD | NEW |