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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc

Issue 159853003: Moving the autofill enum from blink side to browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
index d0c77e299399aeae66264e9300d3a24e70d1d05b..b990f80f0718827b389217fb0c59fce20e4518d6 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
@@ -16,12 +16,12 @@
#include "components/autofill/core/browser/autofill_external_delegate.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
+#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/test_autofill_external_delegate.h"
#include "components/autofill/core/browser/test_autofill_manager_delegate.h"
#include "grit/webkit_resources.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
@@ -32,7 +32,6 @@ using ::testing::AtLeast;
using ::testing::NiceMock;
using base::ASCIIToUTF16;
using base::WeakPtr;
-using blink::WebAutofillClient;
namespace autofill {
namespace {
@@ -237,7 +236,7 @@ TEST_F(AutofillPopupControllerUnitTest, RemoveLine) {
std::vector<int> autofill_ids;
autofill_ids.push_back(1);
autofill_ids.push_back(1);
- autofill_ids.push_back(WebAutofillClient::MenuItemIDAutofillOptions);
+ autofill_ids.push_back(POPUP_ITEM_ID_AUTOFILL_OPTIONS);
autofill_popup_controller_->Show(names, names, names, autofill_ids);
// Generate a popup, so it can be hidden later. It doesn't matter what the
@@ -292,8 +291,8 @@ TEST_F(AutofillPopupControllerUnitTest, SkipSeparator) {
std::vector<base::string16> names(3, base::string16());
std::vector<int> autofill_ids;
autofill_ids.push_back(1);
- autofill_ids.push_back(WebAutofillClient::MenuItemIDSeparator);
- autofill_ids.push_back(WebAutofillClient::MenuItemIDAutofillOptions);
+ autofill_ids.push_back(POPUP_ITEM_ID_SEPARATOR);
+ autofill_ids.push_back(POPUP_ITEM_ID_AUTOFILL_OPTIONS);
autofill_popup_controller_->Show(names, names, names, autofill_ids);
autofill_popup_controller_->SetSelectedLine(0);
@@ -364,8 +363,8 @@ TEST_F(AutofillPopupControllerUnitTest, UpdateDataListValues) {
// Update the expected values.
items.insert(items.begin(), data_list_values[0]);
items.insert(items.begin() + 1, base::string16());
- ids.insert(ids.begin(), WebAutofillClient::MenuItemIDDataListEntry);
- ids.insert(ids.begin() + 1, WebAutofillClient::MenuItemIDSeparator);
+ ids.insert(ids.begin(), POPUP_ITEM_ID_DATALIST_ENTRY);
+ ids.insert(ids.begin() + 1, POPUP_ITEM_ID_SEPARATOR);
EXPECT_EQ(items, autofill_popup_controller_->names());
EXPECT_EQ(ids, autofill_popup_controller_->identifiers());
@@ -378,7 +377,7 @@ TEST_F(AutofillPopupControllerUnitTest, UpdateDataListValues) {
// Update the expected values.
items.insert(items.begin() + 1, data_list_values[1]);
- ids.insert(ids.begin(), WebAutofillClient::MenuItemIDDataListEntry);
+ ids.insert(ids.begin(), POPUP_ITEM_ID_DATALIST_ENTRY);
EXPECT_EQ(items, autofill_popup_controller_->names());
EXPECT_EQ(ids, autofill_popup_controller_->identifiers());
@@ -403,7 +402,7 @@ TEST_F(AutofillPopupControllerUnitTest, PopupsWithOnlyDataLists) {
std::vector<base::string16> items;
items.push_back(base::string16());
std::vector<int> ids;
- ids.push_back(WebAutofillClient::MenuItemIDDataListEntry);
+ ids.push_back(POPUP_ITEM_ID_DATALIST_ENTRY);
autofill_popup_controller_->Show(items, items, items, ids);

Powered by Google App Engine
This is Rietveld 408576698