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

Side by Side Diff: chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc

Issue 1014053002: Provide warning message for setParameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Print only when there is a warning and fix unittest error Created 5 years, 9 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } // namespace 63 } // namespace
64 64
65 // Records the number of calls and their parameters. Always replies successfully 65 // Records the number of calls and their parameters. Always replies successfully
66 // to calls. 66 // to calls.
67 class TestShillThirdPartyVpnDriverClient 67 class TestShillThirdPartyVpnDriverClient
68 : public FakeShillThirdPartyVpnDriverClient { 68 : public FakeShillThirdPartyVpnDriverClient {
69 public: 69 public:
70 void SetParameters( 70 void SetParameters(
71 const std::string& object_path_value, 71 const std::string& object_path_value,
72 const base::DictionaryValue& parameters, 72 const base::DictionaryValue& parameters,
73 const base::Closure& callback, 73 const ShillClientHelper::StringCallback& callback,
74 const ShillClientHelper::ErrorCallback& error_callback) override { 74 const ShillClientHelper::ErrorCallback& error_callback) override {
75 set_parameters_counter_++; 75 set_parameters_counter_++;
76 parameters_ = parameters.DeepCopy(); 76 parameters_ = parameters.DeepCopy();
77 FakeShillThirdPartyVpnDriverClient::SetParameters( 77 FakeShillThirdPartyVpnDriverClient::SetParameters(
78 object_path_value, parameters, callback, error_callback); 78 object_path_value, parameters, callback, error_callback);
79 } 79 }
80 80
81 void UpdateConnectionState( 81 void UpdateConnectionState(
82 const std::string& object_path_value, 82 const std::string& object_path_value,
83 const uint32_t connection_state, 83 const uint32_t connection_state,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // namespace chromeos 421 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698