Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 8892011: Clean up TCW, make it solely a hub for 1:1 observer/helper objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698