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

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

Issue 10843071: Create chrome/browser/api directory. Move infobar delegates used by Autofill to the directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 4 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
13 #include "chrome/browser/content_settings/host_content_settings_map.h" 14 #include "chrome/browser/content_settings/host_content_settings_map.h"
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 15 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
15 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 16 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
16 #include "chrome/browser/infobars/infobar.h" 17 #include "chrome/browser/infobars/infobar.h"
17 #include "chrome/browser/infobars/infobar_tab_helper.h" 18 #include "chrome/browser/infobars/infobar_tab_helper.h"
18 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
19 #include "chrome/browser/ui/tab_contents/tab_contents.h" 19 #include "chrome/browser/ui/tab_contents/tab_contents.h"
20 #include "chrome/browser/ui/tab_contents/test_tab_contents.h" 20 #include "chrome/browser/ui/tab_contents/test_tab_contents.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/test/base/testing_profile.h" 22 #include "chrome/test/base/testing_profile.h"
23 #include "content/public/browser/navigation_details.h" 23 #include "content/public/browser/navigation_details.h"
24 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
25 #include "content/public/browser/notification_service.h" 25 #include "content/public/browser/notification_service.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "content/public/test/mock_render_process_host.h" 27 #include "content/public/test/mock_render_process_host.h"
28 #include "content/public/test/test_browser_thread.h" 28 #include "content/public/test/test_browser_thread.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 ASSERT_FALSE(infobar_0->ShouldExpire(details)); 634 ASSERT_FALSE(infobar_0->ShouldExpire(details));
635 // Commit the "GoBack()" above, and ensure the infobar is now expired. 635 // Commit the "GoBack()" above, and ensure the infobar is now expired.
636 WebContentsTester::For(contents())->CommitPendingNavigation(); 636 WebContentsTester::For(contents())->CommitPendingNavigation();
637 details.entry = contents()->GetController().GetLastCommittedEntry(); 637 details.entry = contents()->GetController().GetLastCommittedEntry();
638 ASSERT_TRUE(infobar_0->ShouldExpire(details)); 638 ASSERT_TRUE(infobar_0->ShouldExpire(details));
639 639
640 // Delete the tab contents. 640 // Delete the tab contents.
641 DeleteContents(); 641 DeleteContents();
642 infobar_0->InfoBarClosed(); 642 infobar_0->InfoBarClosed();
643 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698