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

Unified Diff: chrome/browser/chromeos/customization_document_unittest.cc

Issue 299403012: Clean up shill fake implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/customization_document_unittest.cc
diff --git a/chrome/browser/chromeos/customization_document_unittest.cc b/chrome/browser/chromeos/customization_document_unittest.cc
index 1760fe5395a034f1c82cf593bfb163ddd60d1359..c08dcfdc23bd208c449b17fe9f84259d5397fb0e 100644
--- a/chrome/browser/chromeos/customization_document_unittest.cc
+++ b/chrome/browser/chromeos/customization_document_unittest.cc
@@ -19,6 +19,8 @@
#include "chrome/test/base/testing_profile.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/network/network_handler.h"
+#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_state_handler.h"
#include "chromeos/system/mock_statistics_provider.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -95,9 +97,6 @@ const char kGoodServicesManifest[] =
const char kDummyCustomizationID[] = "test-dummy";
-// Note the path name must be the same as in shill stub.
-const char kStubEthernetServicePath[] = "eth1";
-
} // anonymous namespace
namespace chromeos {
@@ -229,15 +228,18 @@ class ServicesCustomizationDocumentTest : public testing::Test {
DBusThreadManager::InitializeWithStub();
NetworkHandler::Initialize();
+ RunUntilIdle();
+ std::string default_network_path =
+ NetworkHandler::Get()->network_state_handler()->default_network_path();
NetworkPortalDetector::InitializeForTesting(&network_portal_detector_);
NetworkPortalDetector::CaptivePortalState online_state;
online_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE;
online_state.response_code = 204;
network_portal_detector_.SetDefaultNetworkPathForTesting(
- kStubEthernetServicePath);
+ default_network_path);
network_portal_detector_.SetDetectionResultsForTesting(
- kStubEthernetServicePath, online_state);
+ default_network_path, online_state);
TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
ServicesCustomizationDocument::RegisterPrefs(local_state_.registry());

Powered by Google App Engine
This is Rietveld 408576698