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

Side by Side Diff: chrome/renderer/autofill/form_autocomplete_browsertest.cc

Issue 2180093002: [Autofill] Switch on use_new_wrapper_types mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <tuple> 5 #include <tuple>
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/test/base/chrome_render_view_test.h" 10 #include "chrome/test/base/chrome_render_view_test.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool did_unfocus_form() const { return did_unfocus_form_; } 44 bool did_unfocus_form() const { return did_unfocus_form_; }
45 45
46 const FormData* form_will_submit() const { return form_will_submit_.get(); } 46 const FormData* form_will_submit() const { return form_will_submit_.get(); }
47 47
48 const FormData* form_submitted() const { return form_submitted_.get(); } 48 const FormData* form_submitted() const { return form_submitted_.get(); }
49 49
50 private: 50 private:
51 // mojom::AutofillDriver: 51 // mojom::AutofillDriver:
52 void FirstUserGestureObserved() override {} 52 void FirstUserGestureObserved() override {}
53 53
54 void FormsSeen(mojo::Array<FormData> forms, 54 void FormsSeen(const std::vector<FormData>& forms,
55 base::TimeTicks timestamp) override {} 55 base::TimeTicks timestamp) override {}
56 56
57 void WillSubmitForm(const FormData& form, 57 void WillSubmitForm(const FormData& form,
58 base::TimeTicks timestamp) override { 58 base::TimeTicks timestamp) override {
59 form_will_submit_.reset(new FormData(form)); 59 form_will_submit_.reset(new FormData(form));
60 } 60 }
61 61
62 void FormSubmitted(const FormData& form) override { 62 void FormSubmitted(const FormData& form) override {
63 form_submitted_.reset(new FormData(form)); 63 form_submitted_.reset(new FormData(form));
64 } 64 }
(...skipping 13 matching lines...) Expand all
78 78
79 void FocusNoLongerOnForm() override { did_unfocus_form_ = true; } 79 void FocusNoLongerOnForm() override { did_unfocus_form_ = true; }
80 80
81 void DidFillAutofillFormData(const FormData& form, 81 void DidFillAutofillFormData(const FormData& form,
82 base::TimeTicks timestamp) override {} 82 base::TimeTicks timestamp) override {}
83 83
84 void DidPreviewAutofillFormData() override {} 84 void DidPreviewAutofillFormData() override {}
85 85
86 void DidEndTextFieldEditing() override {} 86 void DidEndTextFieldEditing() override {}
87 87
88 void SetDataList(mojo::Array<mojo::String> values, 88 void SetDataList(const std::vector<base::string16>& values,
89 mojo::Array<mojo::String> labels) override {} 89 const std::vector<base::string16>& labels) override {}
90 90
91 // Records whether FocusNoLongerOnForm() get called. 91 // Records whether FocusNoLongerOnForm() get called.
92 bool did_unfocus_form_; 92 bool did_unfocus_form_;
93 // Records the form data received via WillSubmitForm() call. 93 // Records the form data received via WillSubmitForm() call.
94 std::unique_ptr<FormData> form_will_submit_; 94 std::unique_ptr<FormData> form_will_submit_;
95 // Records the form data received via FormSubmitted() call. 95 // Records the form data received via FormSubmitted() call.
96 std::unique_ptr<FormData> form_submitted_; 96 std::unique_ptr<FormData> form_submitted_;
97 97
98 mojo::BindingSet<mojom::AutofillDriver> bindings_; 98 mojo::BindingSet<mojom::AutofillDriver> bindings_;
99 }; 99 };
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 // Submit the form. 651 // Submit the form.
652 ExecuteJavaScriptForTests("document.getElementById('myForm').submit();"); 652 ExecuteJavaScriptForTests("document.getElementById('myForm').submit();");
653 ProcessPendingMessages(); 653 ProcessPendingMessages();
654 654
655 VerifyReceivedRendererMessages(fake_driver_, "Rick", "Deckard", 655 VerifyReceivedRendererMessages(fake_driver_, "Rick", "Deckard",
656 true /* expect_submitted_message */); 656 true /* expect_submitted_message */);
657 } 657 }
658 658
659 } // namespace autofill 659 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698