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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_unittest.cc

Issue 12225076: Delete most web intents code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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
Index: chrome/browser/ui/intents/web_intent_picker_unittest.cc
diff --git a/chrome/browser/ui/intents/web_intent_picker_unittest.cc b/chrome/browser/ui/intents/web_intent_picker_unittest.cc
deleted file mode 100644
index 9c3d24f7bb049e9ca012d435508548d176522bf8..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/intents/web_intent_picker_unittest.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2012 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 "base/basictypes.h"
-#include "chrome/browser/ui/intents/web_intent_picker.h"
-#include "grit/theme_resources.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class WebIntentPickerTest : public testing::Test {
- public:
- WebIntentPickerTest() {}
-};
-
-TEST_F(WebIntentPickerTest, GetStarImageIdsFromCWSRating) {
- struct TestCase {
- double rating;
- int index;
- int expected_star_image;
- } test_cases[] = {
- { 3.4, 0, IDR_CWS_STAR_FULL },
- { 3.4, 1, IDR_CWS_STAR_FULL },
- { 3.4, 2, IDR_CWS_STAR_FULL },
- { 3.4, 3, IDR_CWS_STAR_HALF },
- { 3.4, 4, IDR_CWS_STAR_EMPTY },
- { -1.0, 0, IDR_CWS_STAR_EMPTY },
- { -1.0, 1, IDR_CWS_STAR_EMPTY },
- { -1.0, 2, IDR_CWS_STAR_EMPTY },
- { -1.0, 3, IDR_CWS_STAR_EMPTY },
- { -1.0, 4, IDR_CWS_STAR_EMPTY },
- { 6.0, 0, IDR_CWS_STAR_FULL },
- { 6.0, 1, IDR_CWS_STAR_FULL },
- { 6.0, 2, IDR_CWS_STAR_FULL },
- { 6.0, 3, IDR_CWS_STAR_FULL },
- { 6.0, 4, IDR_CWS_STAR_FULL },
- { 1.6, 0, IDR_CWS_STAR_FULL },
- { 1.6, 1, IDR_CWS_STAR_HALF },
- { 1.6, 2, IDR_CWS_STAR_EMPTY },
- { 1.6, 3, IDR_CWS_STAR_EMPTY },
- { 1.6, 4, IDR_CWS_STAR_EMPTY },
- { 4.2, 0, IDR_CWS_STAR_FULL },
- { 4.2, 1, IDR_CWS_STAR_FULL },
- { 4.2, 2, IDR_CWS_STAR_FULL },
- { 4.2, 3, IDR_CWS_STAR_FULL },
- { 4.2, 4, IDR_CWS_STAR_EMPTY },
- { 3.7, 0, IDR_CWS_STAR_FULL },
- { 3.7, 1, IDR_CWS_STAR_FULL },
- { 3.7, 2, IDR_CWS_STAR_FULL },
- { 3.7, 3, IDR_CWS_STAR_FULL },
- { 3.7, 4, IDR_CWS_STAR_EMPTY },
- };
-
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
- EXPECT_EQ(test_cases[i].expected_star_image,
- WebIntentPicker::GetNthStarImageIdFromCWSRating(
- test_cases[i].rating,
- test_cases[i].index));
- }
-}
« no previous file with comments | « chrome/browser/ui/intents/web_intent_picker_model_unittest.cc ('k') | chrome/browser/ui/omnibox/location_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698