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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 681733003: Removed the ProcessHandle from the RendererClosedDetails payload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments Created 6 years 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
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/browser/mach_broker_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/cross_site_transferring_request.h" 10 #include "content/browser/frame_host/cross_site_transferring_request.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 1398
1399 // Use a cross-process navigation in the opener to swap out the old RVH. 1399 // Use a cross-process navigation in the opener to swap out the old RVH.
1400 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost( 1400 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost(
1401 rvh1->GetSiteInstance())); 1401 rvh1->GetSiteInstance()));
1402 opener1->NavigateAndCommit(kUrl2); 1402 opener1->NavigateAndCommit(kUrl2);
1403 EXPECT_TRUE(opener1_manager->GetSwappedOutRenderViewHost( 1403 EXPECT_TRUE(opener1_manager->GetSwappedOutRenderViewHost(
1404 rvh1->GetSiteInstance())); 1404 rvh1->GetSiteInstance()));
1405 1405
1406 // Fake a process crash. 1406 // Fake a process crash.
1407 RenderProcessHost::RendererClosedDetails details( 1407 RenderProcessHost::RendererClosedDetails details(
1408 rvh1->GetProcess()->GetHandle(),
1409 base::TERMINATION_STATUS_PROCESS_CRASHED, 1408 base::TERMINATION_STATUS_PROCESS_CRASHED,
1410 0); 1409 0);
1411 NotificationService::current()->Notify( 1410 NotificationService::current()->Notify(
1412 NOTIFICATION_RENDERER_PROCESS_CLOSED, 1411 NOTIFICATION_RENDERER_PROCESS_CLOSED,
1413 Source<RenderProcessHost>(rvh1->GetProcess()), 1412 Source<RenderProcessHost>(rvh1->GetProcess()),
1414 Details<RenderProcessHost::RendererClosedDetails>(&details)); 1413 Details<RenderProcessHost::RendererClosedDetails>(&details));
1415 rvh1->set_render_view_created(false); 1414 rvh1->set_render_view_created(false);
1416 1415
1417 // Ensure that the swapped out RenderViewHost has been deleted. 1416 // Ensure that the swapped out RenderViewHost has been deleted.
1418 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost( 1417 EXPECT_FALSE(opener1_manager->GetSwappedOutRenderViewHost(
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 pending_rfh->GetSiteInstance()->increment_active_frame_count(); 1797 pending_rfh->GetSiteInstance()->increment_active_frame_count();
1799 1798
1800 contents()->GetMainFrame()->OnMessageReceived( 1799 contents()->GetMainFrame()->OnMessageReceived(
1801 FrameHostMsg_BeforeUnload_ACK(0, false, now, now)); 1800 FrameHostMsg_BeforeUnload_ACK(0, false, now, now));
1802 EXPECT_FALSE(contents()->cross_navigation_pending()); 1801 EXPECT_FALSE(contents()->cross_navigation_pending());
1803 EXPECT_FALSE(rfh_deleted_observer.deleted()); 1802 EXPECT_FALSE(rfh_deleted_observer.deleted());
1804 } 1803 }
1805 } 1804 }
1806 1805
1807 } // namespace content 1806 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/browser/mach_broker_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698