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