OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/browsing_data/browsing_data_counter_utils.h" | 5 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 test_case.num_addresses); | 70 test_case.num_addresses); |
71 | 71 |
72 SCOPED_TRACE(base::StringPrintf( | 72 SCOPED_TRACE(base::StringPrintf( |
73 "Test params: %d credit card(s), " | 73 "Test params: %d credit card(s), " |
74 "%d address(es), %d suggestion(s).", | 74 "%d address(es), %d suggestion(s).", |
75 test_case.num_credit_cards, | 75 test_case.num_credit_cards, |
76 test_case.num_addresses, | 76 test_case.num_addresses, |
77 test_case.num_suggestions | 77 test_case.num_suggestions |
78 )); | 78 )); |
79 | 79 |
80 base::string16 output = GetCounterTextFromResult(&result); | 80 base::string16 output = GetChromeCounterTextFromResult(&result); |
msramek
2016/08/09 16:28:32
The autofill-related functionality now lives in Ge
ioanap
2016/08/10 09:34:37
Done.
msramek
2016/08/10 09:59:50
Just for the record - for maximum pedantness, this
ioanap
2016/08/10 11:12:32
Acknowledged. Thank you!
| |
81 EXPECT_EQ(output, base::ASCIIToUTF16(test_case.expected_output)); | 81 EXPECT_EQ(output, base::ASCIIToUTF16(test_case.expected_output)); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 #if defined(ENABLE_EXTENSIONS) | 85 #if defined(ENABLE_EXTENSIONS) |
86 // Tests the complex output of the hosted apps counter. | 86 // Tests the complex output of the hosted apps counter. |
87 TEST_F(BrowsingDataCounterUtilsTest, HostedAppsCounterResult) { | 87 TEST_F(BrowsingDataCounterUtilsTest, HostedAppsCounterResult) { |
88 HostedAppsCounter counter(GetProfile()); | 88 HostedAppsCounter counter(GetProfile()); |
89 | 89 |
90 // This test assumes that the strings are served exactly as defined, | 90 // This test assumes that the strings are served exactly as defined, |
(...skipping 22 matching lines...) Expand all Loading... | |
113 // The first two apps in the list are used as examples. | 113 // The first two apps in the list are used as examples. |
114 std::vector<std::string> examples; | 114 std::vector<std::string> examples; |
115 examples.assign( | 115 examples.assign( |
116 apps.begin(), apps.begin() + (apps.size() > 2 ? 2 : apps.size())); | 116 apps.begin(), apps.begin() + (apps.size() > 2 ? 2 : apps.size())); |
117 | 117 |
118 HostedAppsCounter::HostedAppsResult result( | 118 HostedAppsCounter::HostedAppsResult result( |
119 &counter, | 119 &counter, |
120 apps.size(), | 120 apps.size(), |
121 examples); | 121 examples); |
122 | 122 |
123 base::string16 output = GetCounterTextFromResult(&result); | 123 base::string16 output = GetChromeCounterTextFromResult(&result); |
124 EXPECT_EQ(output, base::ASCIIToUTF16(test_case.expected_output)); | 124 EXPECT_EQ(output, base::ASCIIToUTF16(test_case.expected_output)); |
125 } | 125 } |
126 } | 126 } |
127 #endif | 127 #endif |
OLD | NEW |