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

Unified Diff: components/autofill/core/browser/credit_card_unittest.cc

Issue 172473002: Move many of the Autofill unittests into components_unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Load pakfile from same path on all platforms Created 6 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: components/autofill/core/browser/credit_card_unittest.cc
diff --git a/components/autofill/core/browser/credit_card_unittest.cc b/components/autofill/core/browser/credit_card_unittest.cc
index 20ee242fae53e3c2a876f2abda2d499610d40011..805a7f1498278f8e76251e1cae4b68b831f77fc5 100644
--- a/components/autofill/core/browser/credit_card_unittest.cc
+++ b/components/autofill/core/browser/credit_card_unittest.cc
@@ -10,9 +10,14 @@
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/form_field_data.h"
-#include "grit/webkit_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
+// TODO(blundell): Eliminate the need for this conditional include.
+// crbug.com/328150
+#if !defined(OS_IOS)
+#include "grit/webkit_resources.h"
+#endif
+
using base::ASCIIToUTF16;
namespace autofill {
@@ -163,6 +168,10 @@ TEST(CreditCardTest, Compare) {
EXPECT_LT(0, b.Compare(a));
}
+// TODO(blundell): Either move these resources out of webkit_resources or
+// this test into //components/autofill/content/browser to eliminate the
+// need for this ifdef-ing. crbug.com/328150
+#if !defined(OS_IOS)
// Test we get the correct icon for each card type.
TEST(CreditCardTest, IconResourceId) {
EXPECT_EQ(IDR_AUTOFILL_CC_AMEX,
@@ -178,6 +187,7 @@ TEST(CreditCardTest, IconResourceId) {
EXPECT_EQ(IDR_AUTOFILL_CC_VISA,
CreditCard::IconResourceId(kVisaCard));
}
+#endif // !defined(OS_IOS)
TEST(CreditCardTest, UpdateFromImportedCard) {
CreditCard original_card(base::GenerateGUID(), "https://www.example.com");

Powered by Google App Engine
This is Rietveld 408576698