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

Unified Diff: remoting/test/fake_host_list_fetcher.h

Issue 1237883002: Added chromoting test environment for the tests to share data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unittest, display connection stats ability, and error check for transition delay. Created 5 years, 5 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: remoting/test/fake_host_list_fetcher.h
diff --git a/remoting/test/fake_host_list_fetcher.h b/remoting/test/fake_host_list_fetcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..be77ca099dfe493e687402076dc7d258a291b7c2
--- /dev/null
+++ b/remoting/test/fake_host_list_fetcher.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium 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 REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_
+#define REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_
+
+#include "remoting/test/host_list_fetcher.h"
+
+namespace remoting {
+namespace test {
+
+// Used to fake retrieving the host list without making any actual calls to the
+// directory service for information.
+class FakeHostListFetcher : public HostListFetcher {
+ public:
+ FakeHostListFetcher();
+ ~FakeHostListFetcher() override;
+
+ // HostListFetcher interface.
+ void RetrieveHostlist(const std::string& access_token,
+ const HostlistCallback& callback) override;
+
+ void set_retrieved_host_list(const std::vector<HostInfo>& host_list) {
+ host_list_ = host_list;
+ }
+
+ private:
+ std::vector<HostInfo> host_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeHostListFetcher);
+};
+
+} // namespace test
+} // namespace remoting
+
+#endif // REMOTING_TEST_FAKE_HOST_LIST_FETCHER_H_
« no previous file with comments | « remoting/test/chromoting_test_driver_environment_unittest.cc ('k') | remoting/test/fake_host_list_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698