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

Side by Side Diff: chrome/browser/child_process_security_policy_browsertest.cc

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)
Patch Set: Fixed Mac code to handle both SEGV and BUS Created 10 years, 3 months 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 25 matching lines...) Expand all
36 const FilePath kTestFile(FILE_PATH_LITERAL("google.html")); 36 const FilePath kTestFile(FILE_PATH_LITERAL("google.html"));
37 GURL url(ui_test_utils::GetTestUrl(kTestDir, kTestFile)); 37 GURL url(ui_test_utils::GetTestUrl(kTestDir, kTestFile));
38 38
39 ui_test_utils::NavigateToURL(browser(), url); 39 ui_test_utils::NavigateToURL(browser(), url);
40 EXPECT_EQ( 40 EXPECT_EQ(
41 ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U); 41 ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U);
42 42
43 TabContents* tab = browser()->GetTabContentsAt(0); 43 TabContents* tab = browser()->GetTabContentsAt(0);
44 ASSERT_TRUE(tab != NULL); 44 ASSERT_TRUE(tab != NULL);
45 base::KillProcess(tab->GetRenderProcessHost()->GetHandle(), 45 base::KillProcess(tab->GetRenderProcessHost()->GetHandle(),
46 base::PROCESS_END_KILLED_BY_USER, true); 46 base::TERMINATION_STATUS_PROCESS_WAS_KILLED, true);
47 47
48 tab->controller().Reload(true); 48 tab->controller().Reload(true);
49 EXPECT_EQ( 49 EXPECT_EQ(
50 ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U); 50 ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U);
51 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/child_process_launcher.cc ('k') | chrome/browser/extensions/extension_crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698