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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3408 base::RunLoop().Run(); | 3408 base::RunLoop().Run(); |
3409 } | 3409 } |
3410 } | 3410 } |
3411 | 3411 |
3412 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 3412 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
3413 MediaStreamDevicesControllerBrowserTest, | 3413 MediaStreamDevicesControllerBrowserTest, |
3414 testing::Bool()); | 3414 testing::Bool()); |
3415 | 3415 |
3416 class WebBluetoothPolicyTest : public PolicyTest { | 3416 class WebBluetoothPolicyTest : public PolicyTest { |
3417 void SetUpCommandLine(base::CommandLine* command_line)override { | 3417 void SetUpCommandLine(base::CommandLine* command_line)override { |
3418 // This is needed while Web Bluetooth is an Origin Trial, but can go away | 3418 // TODO(juncai): Remove this switch once Web Bluetooth is supported on Linux |
3419 // once it ships globally. | 3419 // and Windows. |
3420 command_line->AppendSwitch(switches::kEnableWebBluetooth); | 3420 // https://crbug.com/570344 |
| 3421 // https://crbug.com/507419 |
| 3422 command_line->AppendSwitch( |
| 3423 switches::kEnableExperimentalWebPlatformFeatures); |
3421 PolicyTest::SetUpCommandLine(command_line); | 3424 PolicyTest::SetUpCommandLine(command_line); |
3422 } | 3425 } |
3423 }; | 3426 }; |
3424 | 3427 |
3425 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) { | 3428 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) { |
3426 // Fake the BluetoothAdapter to say it's present. | 3429 // Fake the BluetoothAdapter to say it's present. |
3427 scoped_refptr<device::MockBluetoothAdapter> adapter = | 3430 scoped_refptr<device::MockBluetoothAdapter> adapter = |
3428 new testing::NiceMock<device::MockBluetoothAdapter>; | 3431 new testing::NiceMock<device::MockBluetoothAdapter>; |
3429 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true)); | 3432 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true)); |
3430 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter); | 3433 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter); |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4489 | 4492 |
4490 SetEmptyPolicy(); | 4493 SetEmptyPolicy(); |
4491 // Policy not set. | 4494 // Policy not set. |
4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4495 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4496 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4497 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
4495 } | 4498 } |
4496 #endif // defined(OS_CHROMEOS) | 4499 #endif // defined(OS_CHROMEOS) |
4497 | 4500 |
4498 } // namespace policy | 4501 } // namespace policy |
OLD | NEW |