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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 { "10,0,45,2", "10.0.45.2" }, // Flash | 24 { "10,0,45,2", "10.0.45.2" }, // Flash |
25 { "10.1 r102", "10.1.102"}, // Flash | 25 { "10.1 r102", "10.1.102"}, // Flash |
26 { "10.3 d180", "10.3.180" }, // Flash (Debug) | 26 { "10.3 d180", "10.3.180" }, // Flash (Debug) |
27 { "11.5.7r609", "11.5.7.609"}, // Shockwave | 27 { "11.5.7r609", "11.5.7.609"}, // Shockwave |
28 { "1.6.0_22", "1.6.0.22"}, // Java | 28 { "1.6.0_22", "1.6.0.22"}, // Java |
29 { "1.07.00_0005", "1.7.0.5"}, // Java with leading zeros | 29 { "1.07.00_0005", "1.7.0.5"}, // Java with leading zeros |
30 { "1..0", "1.0.0" } // Empty version component | 30 { "1..0", "1.0.0" } // Empty version component |
31 }; | 31 }; |
32 | 32 |
33 for (size_t i = 0; i < arraysize(versions); i++) { | 33 for (size_t i = 0; i < arraysize(versions); i++) { |
34 base::Version version; | 34 Version version; |
35 WebPluginInfo::CreateVersionFromString( | 35 WebPluginInfo::CreateVersionFromString( |
36 base::ASCIIToUTF16(versions[i][0]), &version); | 36 base::ASCIIToUTF16(versions[i][0]), &version); |
37 | 37 |
38 ASSERT_TRUE(version.IsValid()); | 38 ASSERT_TRUE(version.IsValid()); |
39 EXPECT_EQ(versions[i][1], version.GetString()); | 39 EXPECT_EQ(versions[i][1], version.GetString()); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 } // namespace content | 43 } // namespace content |
OLD | NEW |