| 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 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3183 base::RunLoop().Run(); | 3183 base::RunLoop().Run(); |
| 3184 } | 3184 } |
| 3185 } | 3185 } |
| 3186 | 3186 |
| 3187 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 3187 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
| 3188 MediaStreamDevicesControllerBrowserTest, | 3188 MediaStreamDevicesControllerBrowserTest, |
| 3189 testing::Bool()); | 3189 testing::Bool()); |
| 3190 | 3190 |
| 3191 class WebBluetoothPolicyTest : public PolicyTest { | 3191 class WebBluetoothPolicyTest : public PolicyTest { |
| 3192 void SetUpCommandLine(base::CommandLine* command_line)override { | 3192 void SetUpCommandLine(base::CommandLine* command_line)override { |
| 3193 // This is needed while Web Bluetooth is an Origin Trial, but can go away | 3193 // TODO(juncai): Remove this switch once Web Bluetooth is supported on Linux |
| 3194 // once it ships globally. | 3194 // and Windows. |
| 3195 command_line->AppendSwitch(switches::kEnableWebBluetooth); | 3195 // https://crbug.com/570344 |
| 3196 // https://crbug.com/507419 |
| 3197 command_line->AppendSwitch( |
| 3198 switches::kEnableExperimentalWebPlatformFeatures); |
| 3196 PolicyTest::SetUpCommandLine(command_line); | 3199 PolicyTest::SetUpCommandLine(command_line); |
| 3197 } | 3200 } |
| 3198 }; | 3201 }; |
| 3199 | 3202 |
| 3200 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) { | 3203 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) { |
| 3201 // Fake the BluetoothAdapter to say it's present. | 3204 // Fake the BluetoothAdapter to say it's present. |
| 3202 scoped_refptr<device::MockBluetoothAdapter> adapter = | 3205 scoped_refptr<device::MockBluetoothAdapter> adapter = |
| 3203 new testing::NiceMock<device::MockBluetoothAdapter>; | 3206 new testing::NiceMock<device::MockBluetoothAdapter>; |
| 3204 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true)); | 3207 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true)); |
| 3205 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter); | 3208 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter); |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4265 | 4268 |
| 4266 SetEmptyPolicy(); | 4269 SetEmptyPolicy(); |
| 4267 // Policy not set. | 4270 // Policy not set. |
| 4268 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4271 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4269 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4272 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4270 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4273 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4271 } | 4274 } |
| 4272 #endif // defined(OS_CHROMEOS) | 4275 #endif // defined(OS_CHROMEOS) |
| 4273 | 4276 |
| 4274 } // namespace policy | 4277 } // namespace policy |
| OLD | NEW |