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 <algorithm> | 7 #include <algorithm> |
8 #include <clocale> | 8 #include <clocale> |
9 #include <cmath> | 9 #include <cmath> |
10 | 10 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { | 469 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { |
470 content::SetDeviceScaleFactor(render_view(), factor); | 470 content::SetDeviceScaleFactor(render_view(), factor); |
471 } | 471 } |
472 | 472 |
473 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { | 473 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { |
474 content::SetDeviceColorProfile(render_view(), name); | 474 content::SetDeviceColorProfile(render_view(), name); |
475 } | 475 } |
476 | 476 |
477 void BlinkTestRunner::SetBluetoothMockDataSet(const std::string& name) { | 477 void BlinkTestRunner::SetBluetoothMockDataSet(const std::string& name) { |
478 Send(new LayoutTestHostMsg_SetBluetoothAdapter(name)); | 478 Send(new LayoutTestHostMsg_SetBluetoothAdapter(name)); |
| 479 // Auto-reset the chooser type so we don't get order dependence when some |
| 480 // tests forget to do it explicitly. |
| 481 Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), false)); |
| 482 } |
| 483 |
| 484 void BlinkTestRunner::SetBluetoothManualChooser() { |
| 485 Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), true)); |
| 486 } |
| 487 std::vector<std::string> BlinkTestRunner::GetBluetoothManualChooserEvents() { |
| 488 std::vector<std::string> result; |
| 489 Send(new ShellViewHostMsg_GetBluetoothManualChooserEvents(routing_id(), |
| 490 &result)); |
| 491 return result; |
| 492 } |
| 493 void BlinkTestRunner::SendBluetoothManualChooserEvent( |
| 494 const std::string& event, |
| 495 const std::string& argument) { |
| 496 Send(new ShellViewHostMsg_SendBluetoothManualChooserEvent(routing_id(), event, |
| 497 argument)); |
479 } | 498 } |
480 | 499 |
481 void BlinkTestRunner::SetGeofencingMockProvider(bool service_available) { | 500 void BlinkTestRunner::SetGeofencingMockProvider(bool service_available) { |
482 content::SetGeofencingMockProvider(service_available); | 501 content::SetGeofencingMockProvider(service_available); |
483 } | 502 } |
484 | 503 |
485 void BlinkTestRunner::ClearGeofencingMockProvider() { | 504 void BlinkTestRunner::ClearGeofencingMockProvider() { |
486 content::ClearGeofencingMockProvider(); | 505 content::ClearGeofencingMockProvider(); |
487 } | 506 } |
488 | 507 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 914 |
896 leak_detector_->TryLeakDetection(main_frame); | 915 leak_detector_->TryLeakDetection(main_frame); |
897 } | 916 } |
898 | 917 |
899 void BlinkTestRunner::ReportLeakDetectionResult( | 918 void BlinkTestRunner::ReportLeakDetectionResult( |
900 const LeakDetectionResult& report) { | 919 const LeakDetectionResult& report) { |
901 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 920 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
902 } | 921 } |
903 | 922 |
904 } // namespace content | 923 } // namespace content |
OLD | NEW |