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 "chrome/browser/geolocation/geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
6 | 6 |
7 #include "base/scoped_vector.h" | 7 #include "base/scoped_vector.h" |
8 #include "chrome/browser/browser_thread.h" | 8 #include "chrome/browser/browser_thread.h" |
9 #include "chrome/browser/geolocation/arbitrator_dependency_factories_for_test.h" | 9 #include "chrome/browser/geolocation/arbitrator_dependency_factories_for_test.h" |
10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
11 #include "chrome/browser/geolocation/geolocation_permission_context.h" | 11 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
12 #include "chrome/browser/geolocation/location_arbitrator.h" | 12 #include "chrome/browser/geolocation/location_arbitrator.h" |
13 #include "chrome/browser/geolocation/location_provider.h" | 13 #include "chrome/browser/geolocation/location_provider.h" |
14 #include "chrome/browser/geolocation/mock_location_provider.h" | 14 #include "chrome/browser/geolocation/mock_location_provider.h" |
15 #include "chrome/browser/renderer_host/mock_render_process_host.h" | |
16 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | |
17 #include "chrome/browser/tab_contents/infobar_delegate.h" | 15 #include "chrome/browser/tab_contents/infobar_delegate.h" |
18 #include "chrome/browser/tab_contents/test_tab_contents.h" | |
19 #include "chrome/common/notification_details.h" | 16 #include "chrome/common/notification_details.h" |
20 #include "chrome/common/notification_type.h" | 17 #include "chrome/common/notification_type.h" |
21 #include "chrome/common/render_messages.h" | 18 #include "chrome/common/render_messages.h" |
22 #include "chrome/test/testing_profile.h" | 19 #include "chrome/test/testing_profile.h" |
| 20 #include "content/browser/renderer_host/mock_render_process_host.h" |
| 21 #include "content/browser/renderer_host/test_render_view_host.h" |
| 22 #include "content/browser/tab_contents/test_tab_contents.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 // TestTabContentsWithPendingInfoBar ------------------------------------------ | 25 // TestTabContentsWithPendingInfoBar ------------------------------------------ |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // TestTabContents short-circuits TAB_CONTENTS_INFOBAR_REMOVED to call | 29 // TestTabContents short-circuits TAB_CONTENTS_INFOBAR_REMOVED to call |
30 // InfoBarClosed() directly. We need to observe it and call InfoBarClosed() | 30 // InfoBarClosed() directly. We need to observe it and call InfoBarClosed() |
31 // later. | 31 // later. |
32 class TestTabContentsWithPendingInfoBar : public TestTabContents { | 32 class TestTabContentsWithPendingInfoBar : public TestTabContents { |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // Ensure only one infobar is created. | 452 // Ensure only one infobar is created. |
453 EXPECT_EQ(1U, contents()->infobar_count()); | 453 EXPECT_EQ(1U, contents()->infobar_count()); |
454 ConfirmInfoBarDelegate* infobar_0 = | 454 ConfirmInfoBarDelegate* infobar_0 = |
455 contents()->GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); | 455 contents()->GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); |
456 ASSERT_TRUE(infobar_0); | 456 ASSERT_TRUE(infobar_0); |
457 string16 text_0 = infobar_0->GetMessageText(); | 457 string16 text_0 = infobar_0->GetMessageText(); |
458 | 458 |
459 // Delete the tab contents. | 459 // Delete the tab contents. |
460 DeleteContents(); | 460 DeleteContents(); |
461 } | 461 } |
OLD | NEW |