OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/strings/string_number_conversions.h" | 5 #include "base/strings/string_number_conversions.h" |
6 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 6 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chromeos/dbus/dbus_thread_manager.h" | 9 #include "chromeos/dbus/dbus_thread_manager.h" |
10 #include "chromeos/dbus/fake_shill_profile_client.h" | 10 #include "chromeos/dbus/fake_shill_profile_client.h" |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 UninstallExtension(extension_id_); | 412 UninstallExtension(extension_id_); |
413 content::RunAllPendingInMessageLoop(); | 413 content::RunAllPendingInMessageLoop(); |
414 EXPECT_FALSE(DoesConfigExist(kTestConfig)); | 414 EXPECT_FALSE(DoesConfigExist(kTestConfig)); |
415 EXPECT_FALSE(DBusThreadManager::Get() | 415 EXPECT_FALSE(DBusThreadManager::Get() |
416 ->GetShillProfileClient() | 416 ->GetShillProfileClient() |
417 ->GetTestInterface() | 417 ->GetTestInterface() |
418 ->GetService(service_path, &profile_path, &properties)); | 418 ->GetService(service_path, &profile_path, &properties)); |
419 } | 419 } |
420 | 420 |
| 421 IN_PROC_BROWSER_TEST_F(VpnProviderApiTest, CreateDisable) { |
| 422 LoadVpnExtension(); |
| 423 AddNetworkProfileForUser(); |
| 424 EXPECT_TRUE(RunExtensionTest("createConfigSuccess")); |
| 425 EXPECT_TRUE(DoesConfigExist(kTestConfig)); |
| 426 |
| 427 const std::string service_path = GetSingleServicePath(); |
| 428 std::string profile_path; |
| 429 base::DictionaryValue properties; |
| 430 EXPECT_TRUE(DBusThreadManager::Get() |
| 431 ->GetShillProfileClient() |
| 432 ->GetTestInterface() |
| 433 ->GetService(service_path, &profile_path, &properties)); |
| 434 |
| 435 ExtensionService* extension_service = |
| 436 extensions::ExtensionSystem::Get(profile())->extension_service(); |
| 437 extension_service->DisableExtension(extension_id_, |
| 438 extensions::Extension::DISABLE_NONE); |
| 439 content::RunAllPendingInMessageLoop(); |
| 440 EXPECT_FALSE(DoesConfigExist(kTestConfig)); |
| 441 EXPECT_FALSE(DBusThreadManager::Get() |
| 442 ->GetShillProfileClient() |
| 443 ->GetTestInterface() |
| 444 ->GetService(service_path, &profile_path, &properties)); |
| 445 } |
| 446 |
421 } // namespace chromeos | 447 } // namespace chromeos |
OLD | NEW |