| 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/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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 SwitchTabAndHideAutofillPopup) { | 122 SwitchTabAndHideAutofillPopup) { |
| 123 // Notification is different on platforms. On linux this will be called twice, | 123 // Notification is different on platforms. On linux this will be called twice, |
| 124 // while on windows only once. | 124 // while on windows only once. |
| 125 EXPECT_CALL(manager_delegate_, HideAutofillPopup()) | 125 EXPECT_CALL(manager_delegate_, HideAutofillPopup()) |
| 126 .Times(testing::AtLeast(1)); | 126 .Times(testing::AtLeast(1)); |
| 127 | 127 |
| 128 scoped_refptr<content::MessageLoopRunner> runner = | 128 scoped_refptr<content::MessageLoopRunner> runner = |
| 129 new content::MessageLoopRunner; | 129 new content::MessageLoopRunner; |
| 130 web_contents_hidden_callback_ = runner->QuitClosure(); | 130 web_contents_hidden_callback_ = runner->QuitClosure(); |
| 131 chrome::AddSelectedTabWithURL(browser(), | 131 chrome::AddSelectedTabWithURL(browser(), |
| 132 GURL(content::kAboutBlankURL), | 132 GURL(url::kAboutBlankURL), |
| 133 content::PAGE_TRANSITION_AUTO_TOPLEVEL); | 133 content::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 134 runner->Run(); | 134 runner->Run(); |
| 135 web_contents_hidden_callback_.Reset(); | 135 web_contents_hidden_callback_.Reset(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 IN_PROC_BROWSER_TEST_F(ContentAutofillDriverBrowserTest, | 138 IN_PROC_BROWSER_TEST_F(ContentAutofillDriverBrowserTest, |
| 139 TestPageNavigationHidingAutofillPopup) { | 139 TestPageNavigationHidingAutofillPopup) { |
| 140 // Notification is different on platforms. On linux this will be called twice, | 140 // Notification is different on platforms. On linux this will be called twice, |
| 141 // while on windows only once. | 141 // while on windows only once. |
| 142 EXPECT_CALL(manager_delegate_, HideAutofillPopup()) | 142 EXPECT_CALL(manager_delegate_, HideAutofillPopup()) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 153 browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIAboutURL), | 153 browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIAboutURL), |
| 154 content::Referrer(), | 154 content::Referrer(), |
| 155 CURRENT_TAB, | 155 CURRENT_TAB, |
| 156 content::PAGE_TRANSITION_TYPED, | 156 content::PAGE_TRANSITION_TYPED, |
| 157 false)); | 157 false)); |
| 158 runner->Run(); | 158 runner->Run(); |
| 159 nav_entry_committed_callback_.Reset(); | 159 nav_entry_committed_callback_.Reset(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace autofill | 162 } // namespace autofill |
| OLD | NEW |