OLD | NEW |
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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/frame_host/interstitial_page_impl.h" | 7 #include "content/browser/frame_host/interstitial_page_impl.h" |
8 #include "content/browser/frame_host/navigation_entry_impl.h" | 8 #include "content/browser/frame_host/navigation_entry_impl.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
11 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 11 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
12 #include "content/common/frame_messages.h" | 12 #include "content/common/frame_messages.h" |
13 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
14 #include "content/public/browser/global_request_id.h" | 14 #include "content/public/browser/global_request_id.h" |
15 #include "content/public/browser/interstitial_page_delegate.h" | 15 #include "content/public/browser/interstitial_page_delegate.h" |
16 #include "content/public/browser/navigation_details.h" | 16 #include "content/public/browser/navigation_details.h" |
17 #include "content/public/browser/notification_details.h" | 17 #include "content/public/browser/notification_details.h" |
18 #include "content/public/browser/notification_source.h" | 18 #include "content/public/browser/notification_source.h" |
19 #include "content/public/browser/render_widget_host_view.h" | 19 #include "content/public/browser/render_widget_host_view.h" |
20 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
21 #include "content/public/browser/web_ui_controller.h" | 21 #include "content/public/browser/web_ui_controller.h" |
22 #include "content/public/common/bindings_policy.h" | 22 #include "content/public/common/bindings_policy.h" |
23 #include "content/public/common/content_constants.h" | 23 #include "content/public/common/content_constants.h" |
24 #include "content/public/common/url_constants.h" | 24 #include "content/public/common/url_constants.h" |
25 #include "content/public/common/url_utils.h" | 25 #include "content/public/common/url_utils.h" |
26 #include "content/public/test/mock_render_process_host.h" | 26 #include "content/public/test/mock_render_process_host.h" |
27 #include "content/public/test/test_browser_thread.h" | |
28 #include "content/public/test/test_utils.h" | 27 #include "content/public/test/test_utils.h" |
29 #include "content/test/test_content_browser_client.h" | 28 #include "content/test/test_content_browser_client.h" |
30 #include "content/test/test_content_client.h" | 29 #include "content/test/test_content_client.h" |
31 #include "content/test/test_render_view_host.h" | 30 #include "content/test/test_render_view_host.h" |
32 #include "content/test/test_web_contents.h" | 31 #include "content/test/test_web_contents.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
34 | 33 |
35 namespace content { | 34 namespace content { |
36 namespace { | 35 namespace { |
37 | 36 |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 // Reset the last active time to a known-bad value. | 2224 // Reset the last active time to a known-bad value. |
2226 contents()->last_active_time_ = base::TimeTicks(); | 2225 contents()->last_active_time_ = base::TimeTicks(); |
2227 ASSERT_TRUE(contents()->GetLastActiveTime().is_null()); | 2226 ASSERT_TRUE(contents()->GetLastActiveTime().is_null()); |
2228 | 2227 |
2229 // Simulate activating the WebContents. The active time should update. | 2228 // Simulate activating the WebContents. The active time should update. |
2230 contents()->WasShown(); | 2229 contents()->WasShown(); |
2231 EXPECT_FALSE(contents()->GetLastActiveTime().is_null()); | 2230 EXPECT_FALSE(contents()->GetLastActiveTime().is_null()); |
2232 } | 2231 } |
2233 | 2232 |
2234 } // namespace content | 2233 } // namespace content |
OLD | NEW |