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

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

Issue 1325953002: Add functions to let tests read and control the Bluetooth chooser state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 5 years, 3 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 <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { 468 void BlinkTestRunner::SetDeviceScaleFactor(float factor) {
469 content::SetDeviceScaleFactor(render_view(), factor); 469 content::SetDeviceScaleFactor(render_view(), factor);
470 } 470 }
471 471
472 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { 472 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) {
473 content::SetDeviceColorProfile(render_view(), name); 473 content::SetDeviceColorProfile(render_view(), name);
474 } 474 }
475 475
476 void BlinkTestRunner::SetBluetoothMockDataSet(const std::string& name) { 476 void BlinkTestRunner::SetBluetoothMockDataSet(const std::string& name) {
477 Send(new LayoutTestHostMsg_SetBluetoothAdapter(name)); 477 Send(new LayoutTestHostMsg_SetBluetoothAdapter(name));
478 // Auto-reset the chooser type so we don't get order dependence when some
479 // tests forget to do it explicitly.
480 Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), false));
481 }
482
483 void BlinkTestRunner::SetBluetoothManualChooser() {
484 Send(new ShellViewHostMsg_SetBluetoothManualChooser(routing_id(), true));
485 }
486 std::vector<std::string> BlinkTestRunner::GetBluetoothManualChooserEvents() {
487 std::vector<std::string> result;
488 Send(new ShellViewHostMsg_GetBluetoothManualChooserEvents(routing_id(),
489 &result));
490 return result;
491 }
492 void BlinkTestRunner::SendBluetoothManualChooserEvent(
493 const std::string& event,
494 const std::string& argument) {
495 Send(new ShellViewHostMsg_SendBluetoothManualChooserEvent(routing_id(), event,
496 argument));
478 } 497 }
479 498
480 void BlinkTestRunner::SetGeofencingMockProvider(bool service_available) { 499 void BlinkTestRunner::SetGeofencingMockProvider(bool service_available) {
481 content::SetGeofencingMockProvider(service_available); 500 content::SetGeofencingMockProvider(service_available);
482 } 501 }
483 502
484 void BlinkTestRunner::ClearGeofencingMockProvider() { 503 void BlinkTestRunner::ClearGeofencingMockProvider() {
485 content::ClearGeofencingMockProvider(); 504 content::ClearGeofencingMockProvider();
486 } 505 }
487 506
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 923
905 leak_detector_->TryLeakDetection(main_frame); 924 leak_detector_->TryLeakDetection(main_frame);
906 } 925 }
907 926
908 void BlinkTestRunner::ReportLeakDetectionResult( 927 void BlinkTestRunner::ReportLeakDetectionResult(
909 const LeakDetectionResult& report) { 928 const LeakDetectionResult& report) {
910 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 929 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
911 } 930 }
912 931
913 } // namespace content 932 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698