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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2437943002: Ship WebBluetooth out of origin trial (Closed)
Patch Set: fixed layout tests on Linux and Windows Created 4 years, 2 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 <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
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 command_line->AppendSwitch(
scheib 2016/10/21 01:02:10 Keep a comment with a TODO(570344,507419): Remove
juncai 2016/10/21 16:57:54 Done.
3419 // once it ships globally. 3419 switches::kEnableExperimentalWebPlatformFeatures);
3420 command_line->AppendSwitch(switches::kEnableWebBluetooth);
3421 PolicyTest::SetUpCommandLine(command_line); 3420 PolicyTest::SetUpCommandLine(command_line);
3422 } 3421 }
3423 }; 3422 };
3424 3423
3425 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) { 3424 IN_PROC_BROWSER_TEST_F(WebBluetoothPolicyTest, Block) {
3426 // Fake the BluetoothAdapter to say it's present. 3425 // Fake the BluetoothAdapter to say it's present.
3427 scoped_refptr<device::MockBluetoothAdapter> adapter = 3426 scoped_refptr<device::MockBluetoothAdapter> adapter =
3428 new testing::NiceMock<device::MockBluetoothAdapter>; 3427 new testing::NiceMock<device::MockBluetoothAdapter>;
3429 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true)); 3428 EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(testing::Return(true));
3430 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter); 3429 device::BluetoothAdapterFactory::SetAdapterForTesting(adapter);
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
4489 4488
4490 SetEmptyPolicy(); 4489 SetEmptyPolicy();
4491 // Policy not set. 4490 // Policy not set.
4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4491 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4492 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4493 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4495 } 4494 }
4496 #endif // defined(OS_CHROMEOS) 4495 #endif // defined(OS_CHROMEOS)
4497 4496
4498 } // namespace policy 4497 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698