OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(MockAutofillClient); | 54 DISALLOW_COPY_AND_ASSIGN(MockAutofillClient); |
55 }; | 55 }; |
56 | 56 |
57 // Subclass ContentAutofillDriver so we can create an ContentAutofillDriver | 57 // Subclass ContentAutofillDriver so we can create an ContentAutofillDriver |
58 // instance. | 58 // instance. |
59 class TestContentAutofillDriver : public ContentAutofillDriver { | 59 class TestContentAutofillDriver : public ContentAutofillDriver { |
60 public: | 60 public: |
61 TestContentAutofillDriver(content::RenderFrameHost* rfh, | 61 TestContentAutofillDriver(content::RenderFrameHost* rfh, |
62 AutofillClient* client) | 62 AutofillClient* client) |
63 : ContentAutofillDriver( | 63 : ContentAutofillDriver(rfh, |
64 rfh, | 64 client, |
65 client, | 65 g_browser_process->GetApplicationLocale(), |
66 g_browser_process->GetApplicationLocale(), | 66 AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER, |
67 AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER) {} | 67 nullptr) {} |
68 ~TestContentAutofillDriver() override {} | 68 ~TestContentAutofillDriver() override {} |
69 | 69 |
70 private: | 70 private: |
71 DISALLOW_COPY_AND_ASSIGN(TestContentAutofillDriver); | 71 DISALLOW_COPY_AND_ASSIGN(TestContentAutofillDriver); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace | 74 } // namespace |
75 | 75 |
76 class ContentAutofillDriverBrowserTest : public InProcessBrowserTest, | 76 class ContentAutofillDriverBrowserTest : public InProcessBrowserTest, |
77 public content::WebContentsObserver { | 77 public content::WebContentsObserver { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 GURL(chrome::kChromeUIBookmarksURL), content::Referrer(), | 144 GURL(chrome::kChromeUIBookmarksURL), content::Referrer(), |
145 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); | 145 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); |
146 browser()->OpenURL(content::OpenURLParams( | 146 browser()->OpenURL(content::OpenURLParams( |
147 GURL(chrome::kChromeUIAboutURL), content::Referrer(), | 147 GURL(chrome::kChromeUIAboutURL), content::Referrer(), |
148 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); | 148 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); |
149 runner->Run(); | 149 runner->Run(); |
150 nav_entry_committed_callback_.Reset(); | 150 nav_entry_committed_callback_.Reset(); |
151 } | 151 } |
152 | 152 |
153 } // namespace autofill | 153 } // namespace autofill |
OLD | NEW |