shill: WiFi: Separate out EAP Event tracking

Separate EAP event tracking into a separate class, so it can be
used by more than one device type.  This also makes unit testing
slightly simpler.  While here also move the code that extracts
remote certification to another WPASupplicant static method.

BUG=chromium:224509
TEST=Unit tests

Change-Id: I7f4e7f5e03044f3f21dc179ea13878add5ae1c9d
Reviewed-on: https://gerrit.chromium.org/gerrit/47010
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
diff --git a/mock_supplicant_eap_state_handler.h b/mock_supplicant_eap_state_handler.h
new file mode 100644
index 0000000..7f15ae2
--- /dev/null
+++ b/mock_supplicant_eap_state_handler.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SHILL_MOCK_SUPPLICANT_EAP_STATE_HANDLER_H_
+#define SHILL_MOCK_SUPPLICANT_EAP_STATE_HANDLER_H_
+
+#include <string>
+
+#include <gmock/gmock.h>
+
+#include "shill/supplicant_eap_state_handler.h"
+
+namespace shill {
+
+class MockSupplicantEAPStateHandler : public SupplicantEAPStateHandler {
+ public:
+  MockSupplicantEAPStateHandler();
+  virtual ~MockSupplicantEAPStateHandler();
+
+  MOCK_METHOD3(ParseStatus, bool(const std::string &status,
+                                 const std::string &parameter,
+                                 Service::ConnectFailure *failure));
+  MOCK_METHOD0(Reset, void());
+  MOCK_METHOD0(is_eap_in_progress, bool());
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockSupplicantEAPStateHandler);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_SUPPLICANT_EAP_STATE_HANDLER_H_