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

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

Issue 289083004: infobars: Componentize ConfirmInfoBarDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months 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) 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 "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/containers/hash_tables.h" 12 #include "base/containers/hash_tables.h"
13 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/content_settings/host_content_settings_map.h" 17 #include "chrome/browser/content_settings/host_content_settings_map.h"
18 #include "chrome/browser/content_settings/permission_request_id.h" 18 #include "chrome/browser/content_settings/permission_request_id.h"
19 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
20 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h" 20 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h"
21 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
22 #include "chrome/browser/infobars/infobar_service.h" 21 #include "chrome/browser/infobars/infobar_service.h"
23 #include "chrome/browser/infobars/infobar_service.h" 22 #include "chrome/browser/infobars/infobar_service.h"
24 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 23 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
25 #include "chrome/test/base/testing_profile.h" 24 #include "chrome/test/base/testing_profile.h"
25 #include "components/infobars/core/confirm_infobar_delegate.h"
26 #include "components/infobars/core/infobar.h" 26 #include "components/infobars/core/infobar.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/navigation_details.h" 28 #include "content/public/browser/navigation_details.h"
29 #include "content/public/browser/notification_registrar.h" 29 #include "content/public/browser/notification_registrar.h"
30 #include "content/public/browser/notification_service.h" 30 #include "content/public/browser/notification_service.h"
31 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
32 #include "content/public/test/mock_render_process_host.h" 32 #include "content/public/test/mock_render_process_host.h"
33 #include "content/public/test/test_renderer_host.h" 33 #include "content/public/test/test_renderer_host.h"
34 #include "content/public/test/web_contents_tester.h" 34 #include "content/public/test/web_contents_tester.h"
35 #include "extensions/browser/view_type_utils.h" 35 #include "extensions/browser/view_type_utils.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 EXPECT_FALSE(infobar_delegate->ShouldExpire( 688 EXPECT_FALSE(infobar_delegate->ShouldExpire(
689 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); 689 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details)));
690 // Ensure the infobar will expire when we commit the pending navigation. 690 // Ensure the infobar will expire when we commit the pending navigation.
691 details.entry = web_contents()->GetController().GetActiveEntry(); 691 details.entry = web_contents()->GetController().GetActiveEntry();
692 EXPECT_TRUE(infobar_delegate->ShouldExpire( 692 EXPECT_TRUE(infobar_delegate->ShouldExpire(
693 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details))); 693 InfoBarService::NavigationDetailsFromLoadCommittedDetails(details)));
694 694
695 // Delete the tab contents. 695 // Delete the tab contents.
696 DeleteContents(); 696 DeleteContents();
697 } 697 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/theme_installed_infobar_delegate.h ('k') | chrome/browser/geolocation/geolocation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698