OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/public/common/webplugininfo.h" | 5 #include "content/public/common/webplugininfo.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 16 matching lines...) Expand all Loading... |
27 { "10,0,45,2", "10.0.45.2" }, // Flash | 27 { "10,0,45,2", "10.0.45.2" }, // Flash |
28 { "10.1 r102", "10.1.102"}, // Flash | 28 { "10.1 r102", "10.1.102"}, // Flash |
29 { "10.3 d180", "10.3.180" }, // Flash (Debug) | 29 { "10.3 d180", "10.3.180" }, // Flash (Debug) |
30 { "11.5.7r609", "11.5.7.609"}, // Shockwave | 30 { "11.5.7r609", "11.5.7.609"}, // Shockwave |
31 { "1.6.0_22", "1.6.0.22"}, // Java | 31 { "1.6.0_22", "1.6.0.22"}, // Java |
32 { "1.07.00_0005", "1.7.0.5"}, // Java with leading zeros | 32 { "1.07.00_0005", "1.7.0.5"}, // Java with leading zeros |
33 { "1..0", "1.0.0" } // Empty version component | 33 { "1..0", "1.0.0" } // Empty version component |
34 }; | 34 }; |
35 | 35 |
36 for (size_t i = 0; i < arraysize(versions); i++) { | 36 for (size_t i = 0; i < arraysize(versions); i++) { |
37 Version version; | 37 base::Version version; |
38 WebPluginInfo::CreateVersionFromString( | 38 WebPluginInfo::CreateVersionFromString( |
39 base::ASCIIToUTF16(versions[i][0]), &version); | 39 base::ASCIIToUTF16(versions[i][0]), &version); |
40 | 40 |
41 ASSERT_TRUE(version.IsValid()); | 41 ASSERT_TRUE(version.IsValid()); |
42 EXPECT_EQ(versions[i][1], version.GetString()); | 42 EXPECT_EQ(versions[i][1], version.GetString()); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 } // namespace content | 46 } // namespace content |
OLD | NEW |