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

Unified Diff: net/quic/platform/impl/quic_test_impl.h

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « net/quic/platform/api/quic_url_test.cc ('k') | net/quic/quartc/quartc_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/impl/quic_test_impl.h
diff --git a/net/quic/platform/impl/quic_test_impl.h b/net/quic/platform/impl/quic_test_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..6be16527516fba05581598052c69e7a18e55d262
--- /dev/null
+++ b/net/quic/platform/impl/quic_test_impl.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2017 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 NET_QUIC_PLATFORM_IMPL_QUIC_TEST_IMPL_H_
+#define NET_QUIC_PLATFORM_IMPL_QUIC_TEST_IMPL_H_
+
+#include "testing/gmock/include/gmock/gmock.h" // IWYU pragma: export
+#include "testing/gtest/include/gtest/gtest.h" // IWYU pragma: export
+
+// When constructed, checks that all QUIC flags have their correct default
+// values and when destructed, restores those values.
+class QuicFlagSaver {
+ public:
+ QuicFlagSaver();
Fan Yang 2017/05/01 14:53:38 I did not see the definitions (as you removed from
Ryan Hamilton 2017/05/01 16:46:30 Good point! I forgot to upload the .cc file :( Do
+ ~QuicFlagSaver();
+};
+
+class QuicTestImpl : public ::testing::Test {
+ private:
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
+};
+
+template <class T>
+class QuicTestWithParamImpl : public ::testing::TestWithParam<T> {
+ private:
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
+};
+
+#endif // NET_QUIC_PLATFORM_IMPL_QUIC_TEST_IMPL_H_
« no previous file with comments | « net/quic/platform/api/quic_url_test.cc ('k') | net/quic/quartc/quartc_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698