Chromium Code Reviews| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/browser/frame_host/cross_site_transferring_request.h" | 8 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 9 #include "content/browser/frame_host/interstitial_page_impl.h" | 9 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" | 10 #include "content/browser/frame_host/navigation_entry_impl.h" |
| (...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2902 load_params.frame_tree_node_id = | 2902 load_params.frame_tree_node_id = |
| 2903 subframe->frame_tree_node()->frame_tree_node_id(); | 2903 subframe->frame_tree_node()->frame_tree_node_id(); |
| 2904 controller().LoadURLWithParams(load_params); | 2904 controller().LoadURLWithParams(load_params); |
| 2905 | 2905 |
| 2906 subframe->OnMessageReceived( | 2906 subframe->OnMessageReceived( |
| 2907 FrameHostMsg_DidStartLoading(subframe->GetRoutingID(), true)); | 2907 FrameHostMsg_DidStartLoading(subframe->GetRoutingID(), true)); |
| 2908 | 2908 |
| 2909 // Commit the navigation in the child frame and send the DidStopLoading | 2909 // Commit the navigation in the child frame and send the DidStopLoading |
| 2910 // message. | 2910 // message. |
| 2911 contents()->TestDidNavigate( | 2911 contents()->TestDidNavigate( |
| 2912 subframe, 3, bar_url, ui::PAGE_TRANSITION_TYPED); | 2912 subframe, 3, bar_url, ui::PAGE_TRANSITION_MANUAL_SUBFRAME); |
|
Avi (use Gerrit)
2015/02/03 17:39:39
This seemed to work before because the code in the
nasko
2015/02/03 17:45:48
Totally makes sense. More of a copy/paste error on
Charlie Reis
2015/02/03 17:46:56
Great. LGTM.
| |
| 2913 subframe->OnMessageReceived( | 2913 subframe->OnMessageReceived( |
| 2914 FrameHostMsg_DidStopLoading(subframe->GetRoutingID())); | 2914 FrameHostMsg_DidStopLoading(subframe->GetRoutingID())); |
| 2915 } | 2915 } |
| 2916 | 2916 |
| 2917 // At this point the status should still be loading, since the main frame | 2917 // At this point the status should still be loading, since the main frame |
| 2918 // hasn't sent the DidstopLoading message yet. | 2918 // hasn't sent the DidstopLoading message yet. |
| 2919 EXPECT_TRUE(contents()->IsLoading()); | 2919 EXPECT_TRUE(contents()->IsLoading()); |
| 2920 EXPECT_TRUE(observer.is_loading()); | 2920 EXPECT_TRUE(observer.is_loading()); |
| 2921 | 2921 |
| 2922 // Send the DidStopLoading for the main frame and ensure it isn't loading | 2922 // Send the DidStopLoading for the main frame and ensure it isn't loading |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3023 | 3023 |
| 3024 // Destroy the remote player. No power save blockers should remain. | 3024 // Destroy the remote player. No power save blockers should remain. |
| 3025 rfh->OnMessageReceived( | 3025 rfh->OnMessageReceived( |
| 3026 FrameHostMsg_MediaPausedNotification(0, kPlayerRemoteId)); | 3026 FrameHostMsg_MediaPausedNotification(0, kPlayerRemoteId)); |
| 3027 EXPECT_FALSE(contents()->has_video_power_save_blocker_for_testing()); | 3027 EXPECT_FALSE(contents()->has_video_power_save_blocker_for_testing()); |
| 3028 EXPECT_FALSE(contents()->has_audio_power_save_blocker_for_testing()); | 3028 EXPECT_FALSE(contents()->has_audio_power_save_blocker_for_testing()); |
| 3029 } | 3029 } |
| 3030 #endif | 3030 #endif |
| 3031 | 3031 |
| 3032 } // namespace content | 3032 } // namespace content |
| OLD | NEW |