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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc

Issue 530153002: Add build and patch to Chrome-Proxy header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments Created 6 years, 3 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 | « chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a4a33b9bd74cd7782b0823aa0b23fe9e462d0a55
--- /dev/null
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright 2014 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.
+
+#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+const char kVersion[] = "1.2.3.4";
+const char kExpectedBuildAndPatch[] = "3.4";
+
+class DataReductionProxyChromeSettingsTest : public testing::Test {
+ public:
+ DataReductionProxyChromeSettingsTest() {}
+};
+
+TEST_F(DataReductionProxyChromeSettingsTest, TestGetBuildAndPatchNumber) {
+ std::string build_and_patch =
+ DataReductionProxyChromeSettings::GetBuildAndPatchNumberFromString(
+ kVersion);
+ EXPECT_EQ(kExpectedBuildAndPatch, build_and_patch);
+
+ build_and_patch =
+ DataReductionProxyChromeSettings::GetBuildAndPatchNumberFromString(
+ "0.0");
bengr 2014/09/02 23:16:14 nit: define kBogusVersion[] = "0.0"
+ EXPECT_EQ(std::string(), build_and_patch);
+}
« no previous file with comments | « chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698