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

Side by Side Diff: content/browser/payments/payment_app_context_impl_unittest.cc

Issue 2586203003: PaymentApp: Remove scope_url parameter from Get/SetManifest methods. (Closed)
Patch Set: rebased Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <cstddef> 5 #include <cstddef>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 base::RunLoop().RunUntilIdle(); 50 base::RunLoop().RunUntilIdle();
51 } 51 }
52 52
53 void CreatePaymentApp(const GURL& scope_url, const GURL& sw_script_url) { 53 void CreatePaymentApp(const GURL& scope_url, const GURL& sw_script_url) {
54 PaymentAppManager* manager = 54 PaymentAppManager* manager =
55 CreatePaymentAppManager(scope_url, sw_script_url); 55 CreatePaymentAppManager(scope_url, sw_script_url);
56 56
57 PaymentAppManifestError error = 57 PaymentAppManifestError error =
58 PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED; 58 PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED;
59 bool called = false; 59 bool called = false;
60 SetManifest(manager, scope_url.spec(), 60 SetManifest(manager, CreatePaymentAppManifestForTest(scope_url.spec()),
61 CreatePaymentAppManifestForTest(scope_url.spec()),
62 base::Bind(&SetManifestCallback, &called, &error)); 61 base::Bind(&SetManifestCallback, &called, &error));
63 ASSERT_TRUE(called); 62 ASSERT_TRUE(called);
64 63
65 ASSERT_EQ(PaymentAppManifestError::NONE, error); 64 ASSERT_EQ(PaymentAppManifestError::NONE, error);
66 } 65 }
67 66
68 private: 67 private:
69 DISALLOW_COPY_AND_ASSIGN(PaymentAppContextTest); 68 DISALLOW_COPY_AND_ASSIGN(PaymentAppContextTest);
70 }; 69 };
71 70
(...skipping 24 matching lines...) Expand all
96 ASSERT_EQ(1U, manifest.second->options.size()); 95 ASSERT_EQ(1U, manifest.second->options.size());
97 EXPECT_EQ("payment-app-icon", manifest.second->options[0]->icon.value()); 96 EXPECT_EQ("payment-app-icon", manifest.second->options[0]->icon.value());
98 EXPECT_EQ("Visa ****", manifest.second->options[0]->name); 97 EXPECT_EQ("Visa ****", manifest.second->options[0]->name);
99 EXPECT_EQ("payment-app-id", manifest.second->options[0]->id); 98 EXPECT_EQ("payment-app-id", manifest.second->options[0]->id);
100 ASSERT_EQ(1U, manifest.second->options[0]->enabled_methods.size()); 99 ASSERT_EQ(1U, manifest.second->options[0]->enabled_methods.size());
101 EXPECT_EQ("visa", manifest.second->options[0]->enabled_methods[0]); 100 EXPECT_EQ("visa", manifest.second->options[0]->enabled_methods[0]);
102 } 101 }
103 } 102 }
104 103
105 } // namespace content 104 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/payments/payment_app_content_unittest_base.cc ('k') | content/browser/payments/payment_app_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698