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