OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | |
6 | |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | |
9 const char kVersion[] = "1.2.3.4"; | |
10 const char kBogusVersion[] = "0.0"; | |
11 const char kExpectedBuild[] = "3"; | |
12 const char kExpectedPatch[] = "4"; | |
13 | |
14 class DataReductionProxyChromeSettingsTest : public testing::Test { | |
15 public: | |
16 DataReductionProxyChromeSettingsTest() {} | |
17 }; | |
18 | |
19 TEST_F(DataReductionProxyChromeSettingsTest, TestGetBuildNumber) { | |
20 std::string build = | |
21 DataReductionProxyChromeSettings::GetBuildNumberFromString(kVersion); | |
22 EXPECT_EQ(kExpectedBuild, build); | |
23 | |
24 build = | |
25 DataReductionProxyChromeSettings::GetBuildNumberFromString(kBogusVersion); | |
26 EXPECT_EQ(std::string(), build); | |
27 } | |
28 | |
29 TEST_F(DataReductionProxyChromeSettingsTest, TestGetPatchNumber) { | |
30 std::string patch = | |
31 DataReductionProxyChromeSettings::GetPatchNumberFromString(kVersion); | |
bengr
2014/09/03 22:28:39
Fix these tests to reflect the new impl.
| |
32 EXPECT_EQ(kExpectedPatch, patch); | |
33 | |
34 patch = | |
35 DataReductionProxyChromeSettings::GetPatchNumberFromString(kBogusVersion); | |
36 EXPECT_EQ(std::string(), patch); | |
37 } | |
OLD | NEW |