| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 tab_contents_wrapper->content_settings(); | 317 tab_contents_wrapper->content_settings(); |
| 318 const GeolocationSettingsState& settings_state = | 318 const GeolocationSettingsState& settings_state = |
| 319 content_settings->geolocation_settings_state(); | 319 content_settings->geolocation_settings_state(); |
| 320 size_t state_map_size = settings_state.state_map().size(); | 320 size_t state_map_size = settings_state.state_map().size(); |
| 321 ASSERT_TRUE(infobar_); | 321 ASSERT_TRUE(infobar_); |
| 322 LOG(WARNING) << "will set infobar response"; | 322 LOG(WARNING) << "will set infobar response"; |
| 323 { | 323 { |
| 324 ui_test_utils::WindowedNotificationObserver observer( | 324 ui_test_utils::WindowedNotificationObserver observer( |
| 325 content::NOTIFICATION_LOAD_STOP, | 325 content::NOTIFICATION_LOAD_STOP, |
| 326 content::Source<NavigationController>( | 326 content::Source<NavigationController>( |
| 327 &tab_contents_wrapper->controller())); | 327 &tab_contents_wrapper->tab_contents()->controller())); |
| 328 if (allowed) | 328 if (allowed) |
| 329 infobar_->AsConfirmInfoBarDelegate()->Accept(); | 329 infobar_->AsConfirmInfoBarDelegate()->Accept(); |
| 330 else | 330 else |
| 331 infobar_->AsConfirmInfoBarDelegate()->Cancel(); | 331 infobar_->AsConfirmInfoBarDelegate()->Cancel(); |
| 332 observer.Wait(); | 332 observer.Wait(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 tab_contents_wrapper->infobar_tab_helper()->RemoveInfoBar(infobar_); | 335 tab_contents_wrapper->infobar_tab_helper()->RemoveInfoBar(infobar_); |
| 336 LOG(WARNING) << "infobar response set"; | 336 LOG(WARNING) << "infobar response set"; |
| 337 infobar_ = NULL; | 337 infobar_ = NULL; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 "window.domAutomationController.setAutomationId(0);" | 677 "window.domAutomationController.setAutomationId(0);" |
| 678 "window.domAutomationController.send(window.close());"; | 678 "window.domAutomationController.send(window.close());"; |
| 679 bool result = | 679 bool result = |
| 680 ui_test_utils::ExecuteJavaScript( | 680 ui_test_utils::ExecuteJavaScript( |
| 681 current_browser_->GetSelectedTabContents()->render_view_host(), | 681 current_browser_->GetSelectedTabContents()->render_view_host(), |
| 682 L"", UTF8ToWide(script)); | 682 L"", UTF8ToWide(script)); |
| 683 EXPECT_EQ(result, true); | 683 EXPECT_EQ(result, true); |
| 684 } | 684 } |
| 685 | 685 |
| 686 } // namespace | 686 } // namespace |
| OLD | NEW |