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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "chrome/browser/ui/intents/web_intent_picker.h" | 6 #include "chrome/browser/ui/intents/web_intent_picker.h" |
7 #include "grit/theme_resources.h" | 7 #include "grit/theme_resources_standard.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 class WebIntentPickerTest : public testing::Test { | 10 class WebIntentPickerTest : public testing::Test { |
11 public: | 11 public: |
12 WebIntentPickerTest() {} | 12 WebIntentPickerTest() {} |
13 }; | 13 }; |
14 | 14 |
15 TEST_F(WebIntentPickerTest, GetStarImageIdsFromCWSRating) { | 15 TEST_F(WebIntentPickerTest, GetStarImageIdsFromCWSRating) { |
16 struct TestCase { | 16 struct TestCase { |
17 double rating; | 17 double rating; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 { 3.7, 4, IDR_CWS_STAR_EMPTY }, | 50 { 3.7, 4, IDR_CWS_STAR_EMPTY }, |
51 }; | 51 }; |
52 | 52 |
53 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { | 53 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { |
54 EXPECT_EQ(test_cases[i].expected_star_image, | 54 EXPECT_EQ(test_cases[i].expected_star_image, |
55 WebIntentPicker::GetNthStarImageIdFromCWSRating( | 55 WebIntentPicker::GetNthStarImageIdFromCWSRating( |
56 test_cases[i].rating, | 56 test_cases[i].rating, |
57 test_cases[i].index)); | 57 test_cases[i].index)); |
58 } | 58 } |
59 } | 59 } |
OLD | NEW |