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

Side by Side Diff: chrome/browser/renderer_host/test/web_cache_manager_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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/renderer_host/render_process_host.h" 10 #include "chrome/browser/renderer_host/render_process_host.h"
(...skipping 15 matching lines...) Expand all
26 GURL url(ui_test_utils::GetTestUrl(kTestDir, kTestFile)); 26 GURL url(ui_test_utils::GetTestUrl(kTestDir, kTestFile));
27 27
28 ui_test_utils::NavigateToURL(browser(), url); 28 ui_test_utils::NavigateToURL(browser(), url);
29 29
30 browser()->NewTab(); 30 browser()->NewTab();
31 ui_test_utils::NavigateToURL(browser(), url); 31 ui_test_utils::NavigateToURL(browser(), url);
32 32
33 TabContents* tab = browser()->GetTabContentsAt(0); 33 TabContents* tab = browser()->GetTabContentsAt(0);
34 ASSERT_TRUE(tab != NULL); 34 ASSERT_TRUE(tab != NULL);
35 base::KillProcess(tab->GetRenderProcessHost()->GetHandle(), 35 base::KillProcess(tab->GetRenderProcessHost()->GetHandle(),
36 base::PROCESS_END_KILLED_BY_USER, true); 36 base::TERMINATION_STATUS_PROCESS_WAS_KILLED, true);
37 37
38 browser()->SelectTabContentsAt(0, true); 38 browser()->SelectTabContentsAt(0, true);
39 browser()->NewTab(); 39 browser()->NewTab();
40 ui_test_utils::NavigateToURL(browser(), url); 40 ui_test_utils::NavigateToURL(browser(), url);
41 41
42 browser()->SelectTabContentsAt(0, true); 42 browser()->SelectTabContentsAt(0, true);
43 browser()->NewTab(); 43 browser()->NewTab();
44 ui_test_utils::NavigateToURL(browser(), url); 44 ui_test_utils::NavigateToURL(browser(), url);
45 45
46 // We would have crashed at the above line with the bug. 46 // We would have crashed at the above line with the bug.
47 47
48 browser()->SelectTabContentsAt(0, true); 48 browser()->SelectTabContentsAt(0, true);
49 browser()->CloseTab(); 49 browser()->CloseTab();
50 browser()->SelectTabContentsAt(0, true); 50 browser()->SelectTabContentsAt(0, true);
51 browser()->CloseTab(); 51 browser()->CloseTab();
52 browser()->SelectTabContentsAt(0, true); 52 browser()->SelectTabContentsAt(0, true);
53 browser()->CloseTab(); 53 browser()->CloseTab();
54 54
55 ui_test_utils::NavigateToURL(browser(), url); 55 ui_test_utils::NavigateToURL(browser(), url);
56 56
57 EXPECT_EQ( 57 EXPECT_EQ(
58 WebCacheManager::GetInstance()->active_renderers_.size(), 1U); 58 WebCacheManager::GetInstance()->active_renderers_.size(), 1U);
59 EXPECT_EQ( 59 EXPECT_EQ(
60 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U); 60 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U);
61 EXPECT_EQ( 61 EXPECT_EQ(
62 WebCacheManager::GetInstance()->stats_.size(), 1U); 62 WebCacheManager::GetInstance()->stats_.size(), 1U);
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/test/test_render_view_host.h ('k') | chrome/browser/tab_contents/interstitial_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698