Index: content/browser/payments/payment_app_manager_unittest.cc |
diff --git a/content/browser/payments/payment_app_manager_unittest.cc b/content/browser/payments/payment_app_manager_unittest.cc |
index c680ed69082b230f08d63b509d2d1ed915e7ef79..8d7339b7b49c69248afd9a9c2103db0809db1115 100644 |
--- a/content/browser/payments/payment_app_manager_unittest.cc |
+++ b/content/browser/payments/payment_app_manager_unittest.cc |
@@ -59,7 +59,7 @@ class PaymentAppManagerTest : public PaymentAppContentUnitTestBase { |
PaymentAppManagerTest() { |
manager_ = CreatePaymentAppManager(GURL(kServiceWorkerPattern), |
GURL(kServiceWorkerScript)); |
- EXPECT_NE(manager_, nullptr); |
+ EXPECT_NE(nullptr, manager_); |
} |
PaymentAppManager* payment_app_manager() const { return manager_; } |
@@ -80,7 +80,7 @@ TEST_F(PaymentAppManagerTest, SetAndGetManifest) { |
base::Bind(&SetManifestCallback, &called, &error)); |
ASSERT_TRUE(called); |
- ASSERT_EQ(error, payments::mojom::PaymentAppManifestError::NONE); |
+ ASSERT_EQ(payments::mojom::PaymentAppManifestError::NONE, error); |
called = false; |
payments::mojom::PaymentAppManifestPtr read_manifest; |
@@ -91,15 +91,15 @@ TEST_F(PaymentAppManagerTest, SetAndGetManifest) { |
base::Bind(&GetManifestCallback, &called, &read_manifest, &read_error)); |
ASSERT_TRUE(called); |
- ASSERT_EQ(read_error, payments::mojom::PaymentAppManifestError::NONE); |
- EXPECT_EQ(read_manifest->icon.value(), "payment-app-icon"); |
- EXPECT_EQ(read_manifest->name, "Payment App"); |
- ASSERT_EQ(read_manifest->options.size(), 1U); |
- EXPECT_EQ(read_manifest->options[0]->icon.value(), "payment-app-icon"); |
- EXPECT_EQ(read_manifest->options[0]->name, "Visa ****"); |
- EXPECT_EQ(read_manifest->options[0]->id, "payment-app-id"); |
- ASSERT_EQ(read_manifest->options[0]->enabled_methods.size(), 1U); |
- EXPECT_EQ(read_manifest->options[0]->enabled_methods[0], "visa"); |
+ ASSERT_EQ(payments::mojom::PaymentAppManifestError::NONE, read_error); |
+ EXPECT_EQ("payment-app-icon", read_manifest->icon.value()); |
+ EXPECT_EQ("Payment App", read_manifest->name); |
+ ASSERT_EQ(1U, read_manifest->options.size()); |
+ EXPECT_EQ("payment-app-icon", read_manifest->options[0]->icon.value()); |
+ EXPECT_EQ("Visa ****", read_manifest->options[0]->name); |
+ EXPECT_EQ("payment-app-id", read_manifest->options[0]->id); |
+ ASSERT_EQ(1U, read_manifest->options[0]->enabled_methods.size()); |
+ EXPECT_EQ("visa", read_manifest->options[0]->enabled_methods[0]); |
} |
TEST_F(PaymentAppManagerTest, SetManifestWithoutAssociatedServiceWorker) { |
@@ -111,7 +111,7 @@ TEST_F(PaymentAppManagerTest, SetManifestWithoutAssociatedServiceWorker) { |
base::Bind(&SetManifestCallback, &called, &error)); |
ASSERT_TRUE(called); |
- EXPECT_EQ(error, payments::mojom::PaymentAppManifestError::NO_ACTIVE_WORKER); |
+ EXPECT_EQ(payments::mojom::PaymentAppManifestError::NO_ACTIVE_WORKER, error); |
} |
TEST_F(PaymentAppManagerTest, GetManifestWithoutAssociatedServiceWorker) { |
@@ -124,8 +124,8 @@ TEST_F(PaymentAppManagerTest, GetManifestWithoutAssociatedServiceWorker) { |
base::Bind(&GetManifestCallback, &called, &read_manifest, &read_error)); |
ASSERT_TRUE(called); |
- EXPECT_EQ(read_error, |
- payments::mojom::PaymentAppManifestError::NO_ACTIVE_WORKER); |
+ EXPECT_EQ(payments::mojom::PaymentAppManifestError::NO_ACTIVE_WORKER, |
+ read_error); |
} |
TEST_F(PaymentAppManagerTest, GetManifestWithNoSavedManifest) { |
@@ -138,8 +138,9 @@ TEST_F(PaymentAppManagerTest, GetManifestWithNoSavedManifest) { |
base::Bind(&GetManifestCallback, &called, &read_manifest, &read_error)); |
ASSERT_TRUE(called); |
- EXPECT_EQ(read_error, payments::mojom::PaymentAppManifestError:: |
- MANIFEST_STORAGE_OPERATION_FAILED); |
+ EXPECT_EQ(payments::mojom::PaymentAppManifestError:: |
please use gerrit instead
2016/12/19 20:27:58
Maybe you should put "using payments::mojom::Payme
zino
2016/12/20 17:11:28
Done.
|
+ MANIFEST_STORAGE_OPERATION_FAILED, |
+ read_error); |
} |
} // namespace content |