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

Side by Side Diff: content/test/content_browser_test_test.cc

Issue 2610803003: Renable ContentBrowserTest.RendererCrashCallStack (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/public/test/content_browser_test.h" 5 #include "content/public/test/content_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/process/launch.h" 9 #include "base/process/launch.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_RendererCrash) { 61 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MANUAL_RendererCrash) {
62 scoped_refptr<MessageLoopRunner> message_loop_runner = new MessageLoopRunner; 62 scoped_refptr<MessageLoopRunner> message_loop_runner = new MessageLoopRunner;
63 CrashObserver crash_observer(message_loop_runner->QuitClosure()); 63 CrashObserver crash_observer(message_loop_runner->QuitClosure());
64 shell()->web_contents()->GetRenderProcessHost()->AddObserver(&crash_observer); 64 shell()->web_contents()->GetRenderProcessHost()->AddObserver(&crash_observer);
65 65
66 NavigateToURL(shell(), GURL("chrome:crash")); 66 NavigateToURL(shell(), GURL("chrome:crash"));
67 message_loop_runner->Run(); 67 message_loop_runner->Run();
68 } 68 }
69 69
70 // Tests that browser tests print the callstack when a child process crashes. 70 // Tests that browser tests print the callstack when a child process crashes.
71 #if defined(OS_WIN) 71 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, RendererCrashCallStack) {
72 #define MAYBE_RendererCrashCallStack \
73 DISABLED_RendererCrashCallStack
74 #else
75 #define MAYBE_RendererCrashCallStack \
76 RendererCrashCallStack
77 #endif
78 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, MAYBE_RendererCrashCallStack) {
79 base::ThreadRestrictions::ScopedAllowIO allow_io_for_temp_dir; 72 base::ThreadRestrictions::ScopedAllowIO allow_io_for_temp_dir;
80 base::ScopedTempDir temp_dir; 73 base::ScopedTempDir temp_dir;
81 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 74 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
82 base::CommandLine new_test = 75 base::CommandLine new_test =
83 base::CommandLine(base::CommandLine::ForCurrentProcess()->GetProgram()); 76 base::CommandLine(base::CommandLine::ForCurrentProcess()->GetProgram());
84 new_test.AppendSwitchASCII(base::kGTestFilterFlag, 77 new_test.AppendSwitchASCII(base::kGTestFilterFlag,
85 "ContentBrowserTest.MANUAL_RendererCrash"); 78 "ContentBrowserTest.MANUAL_RendererCrash");
86 new_test.AppendSwitch(kRunManualTestsFlag); 79 new_test.AppendSwitch(kRunManualTestsFlag);
87 new_test.AppendSwitch(kSingleProcessTestsFlag); 80 new_test.AppendSwitch(kSingleProcessTestsFlag);
88 81
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 172
180 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, NonNestableTask) { 173 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, NonNestableTask) {
181 bool non_nested_task_ran = false; 174 bool non_nested_task_ran = false;
182 base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask( 175 base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
183 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran)); 176 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
184 content::RunAllPendingInMessageLoop(); 177 content::RunAllPendingInMessageLoop();
185 ASSERT_TRUE(non_nested_task_ran); 178 ASSERT_TRUE(non_nested_task_ran);
186 } 179 }
187 180
188 } // namespace content 181 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698