| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 310 |
| 311 content::WebContents* GetActiveWebContents() { | 311 content::WebContents* GetActiveWebContents() { |
| 312 return browser()->tab_strip_model()->GetActiveWebContents(); | 312 return browser()->tab_strip_model()->GetActiveWebContents(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 content::RenderViewHost* GetRenderViewHost() { | 315 content::RenderViewHost* GetRenderViewHost() { |
| 316 return GetActiveWebContents()->GetRenderViewHost(); | 316 return GetActiveWebContents()->GetRenderViewHost(); |
| 317 } | 317 } |
| 318 | 318 |
| 319 scoped_ptr<AutofillDialogViewTester> GetViewTester() { | 319 scoped_ptr<AutofillDialogViewTester> GetViewTester() { |
| 320 return AutofillDialogViewTester::For(controller()->view()).Pass(); | 320 return AutofillDialogViewTester::For(controller()->view()); |
| 321 } | 321 } |
| 322 | 322 |
| 323 TestAutofillDialogController* controller() { return controller_; } | 323 TestAutofillDialogController* controller() { return controller_; } |
| 324 | 324 |
| 325 void RunMessageLoop() { | 325 void RunMessageLoop() { |
| 326 message_loop_runner_->Run(); | 326 message_loop_runner_->Run(); |
| 327 } | 327 } |
| 328 | 328 |
| 329 // Loads an HTML page in |GetActiveWebContents()| with markup as follows: | 329 // Loads an HTML page in |GetActiveWebContents()| with markup as follows: |
| 330 // <form>|form_inner_html|</form>. After loading, emulates a click event on | 330 // <form>|form_inner_html|</form>. After loading, emulates a click event on |
| (...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 ASSERT_TRUE(content::ExecuteScriptAndExtractString(GetRenderViewHost(), | 1329 ASSERT_TRUE(content::ExecuteScriptAndExtractString(GetRenderViewHost(), |
| 1330 "navigateFrame();", | 1330 "navigateFrame();", |
| 1331 &unused)); | 1331 &unused)); |
| 1332 ExpectDomMessage("iframe loaded"); | 1332 ExpectDomMessage("iframe loaded"); |
| 1333 ChromeAutofillClient* client = | 1333 ChromeAutofillClient* client = |
| 1334 ChromeAutofillClient::FromWebContents(GetActiveWebContents()); | 1334 ChromeAutofillClient::FromWebContents(GetActiveWebContents()); |
| 1335 EXPECT_FALSE(client->GetDialogControllerForTesting()); | 1335 EXPECT_FALSE(client->GetDialogControllerForTesting()); |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 } // namespace autofill | 1338 } // namespace autofill |
| OLD | NEW |