| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_tabstrip.h" | 8 #include "chrome/browser/ui/browser_tabstrip.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 : public InProcessBrowserTest, | 79 : public InProcessBrowserTest, |
| 80 public content::WebContentsObserver { | 80 public content::WebContentsObserver { |
| 81 public: | 81 public: |
| 82 AutofillDriverImplBrowserTest() {} | 82 AutofillDriverImplBrowserTest() {} |
| 83 virtual ~AutofillDriverImplBrowserTest() {} | 83 virtual ~AutofillDriverImplBrowserTest() {} |
| 84 | 84 |
| 85 virtual void SetUpOnMainThread() OVERRIDE { | 85 virtual void SetUpOnMainThread() OVERRIDE { |
| 86 web_contents_ = browser()->tab_strip_model()->GetActiveWebContents(); | 86 web_contents_ = browser()->tab_strip_model()->GetActiveWebContents(); |
| 87 ASSERT_TRUE(web_contents_ != NULL); | 87 ASSERT_TRUE(web_contents_ != NULL); |
| 88 Observe(web_contents_); | 88 Observe(web_contents_); |
| 89 AutofillManager::RegisterUserPrefs(manager_delegate_.GetPrefRegistry()); | 89 AutofillManager::RegisterProfilePrefs(manager_delegate_.GetPrefRegistry()); |
| 90 | 90 |
| 91 autofill_driver_.reset(new TestAutofillDriverImpl(web_contents_, | 91 autofill_driver_.reset(new TestAutofillDriverImpl(web_contents_, |
| 92 &manager_delegate_)); | 92 &manager_delegate_)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Normally the WebContents will automatically delete the driver, but here | 95 // Normally the WebContents will automatically delete the driver, but here |
| 96 // the driver is owned by this test, so we have to manually destroy. | 96 // the driver is owned by this test, so we have to manually destroy. |
| 97 virtual void WebContentsDestroyed(content::WebContents* web_contents) | 97 virtual void WebContentsDestroyed(content::WebContents* web_contents) |
| 98 OVERRIDE { | 98 OVERRIDE { |
| 99 DCHECK_EQ(web_contents_, web_contents); | 99 DCHECK_EQ(web_contents_, web_contents); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 browser()->OpenURL(content::OpenURLParams( | 136 browser()->OpenURL(content::OpenURLParams( |
| 137 GURL(chrome::kChromeUIBookmarksURL), content::Referrer(), | 137 GURL(chrome::kChromeUIBookmarksURL), content::Referrer(), |
| 138 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); | 138 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); |
| 139 browser()->OpenURL(content::OpenURLParams( | 139 browser()->OpenURL(content::OpenURLParams( |
| 140 GURL(chrome::kChromeUIAboutURL), content::Referrer(), | 140 GURL(chrome::kChromeUIAboutURL), content::Referrer(), |
| 141 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); | 141 CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); |
| 142 observer.Wait(); | 142 observer.Wait(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace autofill | 145 } // namespace autofill |
| OLD | NEW |