ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / core / browser / test_autofill_driver.h
blob35fb8ec1916c57c95bdef900d0e6b6d80a415843
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_DRIVER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_DRIVER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "components/autofill/core/browser/autofill_driver.h"
13 namespace base {
14 class SequencedWorkerPoolOwner;
17 namespace autofill {
19 // This class is only for easier writing of tests.
20 class TestAutofillDriver : public AutofillDriver {
21 public:
22 TestAutofillDriver();
23 ~TestAutofillDriver() override;
25 // AutofillDriver implementation.
26 bool IsOffTheRecord() const override;
27 // Returns the value passed in to the last call to |SetURLRequestContext()|
28 // or NULL if that method has never been called.
29 net::URLRequestContextGetter* GetURLRequestContext() override;
30 base::SequencedWorkerPool* GetBlockingPool() override;
31 bool RendererIsAvailable() override;
32 void SendFormDataToRenderer(int query_id,
33 RendererFormDataAction action,
34 const FormData& data) override;
35 void PingRenderer() override;
36 void DetectAccountCreationForms(
37 const std::vector<autofill::FormStructure*>& forms) override;
38 void SendAutofillTypePredictionsToRenderer(
39 const std::vector<FormStructure*>& forms) override;
40 void RendererShouldAcceptDataListSuggestion(
41 const base::string16& value) override;
42 void RendererShouldClearFilledForm() override;
43 void RendererShouldClearPreviewedForm() override;
44 void RendererShouldFillFieldWithValue(const base::string16& value) override;
45 void RendererShouldPreviewFieldWithValue(
46 const base::string16& value) override;
47 void PopupHidden() override;
49 // Methods that tests can use to specialize functionality.
51 // Sets the URL request context for this instance. |url_request_context|
52 // should outlive this instance.
53 void SetURLRequestContext(net::URLRequestContextGetter* url_request_context);
55 private:
56 scoped_ptr<base::SequencedWorkerPoolOwner> blocking_pool_owner_;
57 net::URLRequestContextGetter* url_request_context_;
59 DISALLOW_COPY_AND_ASSIGN(TestAutofillDriver);
62 } // namespace autofill
64 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_DRIVER_H_