#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
-#include "chrome/browser/chromeos/net/network_portal_detector.h"
#include "chrome/browser/chromeos/net/network_portal_detector_impl.h"
-#include "chrome/browser/chromeos/net/network_portal_detector_strategy.h"
#include "chrome/browser/chromeos/net/network_portal_detector_test_utils.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/shill_service_client.h"
+#include "chromeos/network/portal_detector/network_portal_detector.h"
+#include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
#include "components/captive_portal/captive_portal_testing_utils.h"
#include "content/public/test/test_utils.h"
#include "dbus/object_path.h"
NetworkPortalNotificationController::kUserActionMetric;
const char kTestUser[] = "test-user@gmail.com";
-const char kWifi[] = "wifi";
+const char kWifiServicePath[] = "/service/wifi";
+const char kWifiGuid[] = "wifi";
void ErrorCallbackFunction(const std::string& error_name,
const std::string& error_message) {
ShillServiceClient::TestInterface* service_test =
DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface();
service_test->ClearServices();
- service_test->AddService(kWifi,
- kWifi,
+ service_test->AddService(kWifiServicePath,
+ kWifiGuid,
+ "wifi",
shill::kTypeEthernet,
shill::kStateIdle,
true /* add_to_visible */);
DBusThreadManager::Get()->GetShillServiceClient()->SetProperty(
- dbus::ObjectPath(kWifi),
+ dbus::ObjectPath(kWifiServicePath),
shill::kStateProperty,
base::StringValue(shill::kStatePortal),
base::Bind(&base::DoNothing),
content::RunAllPendingInMessageLoop();
// User connects to wifi.
- SetConnected(kWifi);
+ SetConnected(kWifiServicePath);
ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_SESSION, strategy()->Id());
// Check that wifi is marked as behind the portal and that notification
// is displayed.
ASSERT_TRUE(message_center()->FindVisibleNotificationById(kNotificationId));
- ASSERT_EQ(NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL,
- NetworkPortalDetector::Get()->GetCaptivePortalState(kWifi).status);
+ ASSERT_EQ(
+ NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL,
+ NetworkPortalDetector::Get()->GetCaptivePortalState(kWifiGuid).status);
// Wait until notification is displayed.
observer.WaitAndReset();