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

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

Issue 2238963002: Disable ContentBrowserTest.RendererCrashCallStack on win7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, RendererCrashCallStack) { 71 #if defined(OS_WIN)
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) {
72 base::ThreadRestrictions::ScopedAllowIO allow_io_for_temp_dir; 79 base::ThreadRestrictions::ScopedAllowIO allow_io_for_temp_dir;
73 base::ScopedTempDir temp_dir; 80 base::ScopedTempDir temp_dir;
74 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 81 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
75 base::CommandLine new_test = 82 base::CommandLine new_test =
76 base::CommandLine(base::CommandLine::ForCurrentProcess()->GetProgram()); 83 base::CommandLine(base::CommandLine::ForCurrentProcess()->GetProgram());
77 new_test.AppendSwitchASCII(base::kGTestFilterFlag, 84 new_test.AppendSwitchASCII(base::kGTestFilterFlag,
78 "ContentBrowserTest.MANUAL_RendererCrash"); 85 "ContentBrowserTest.MANUAL_RendererCrash");
79 new_test.AppendSwitch(kRunManualTestsFlag); 86 new_test.AppendSwitch(kRunManualTestsFlag);
80 new_test.AppendSwitch(kSingleProcessTestsFlag); 87 new_test.AppendSwitch(kSingleProcessTestsFlag);
81 88
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 179
173 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, NonNestableTask) { 180 IN_PROC_BROWSER_TEST_F(ContentBrowserTest, NonNestableTask) {
174 bool non_nested_task_ran = false; 181 bool non_nested_task_ran = false;
175 base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask( 182 base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
176 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran)); 183 FROM_HERE, base::Bind(&CallbackChecker, &non_nested_task_ran));
177 content::RunAllPendingInMessageLoop(); 184 content::RunAllPendingInMessageLoop();
178 ASSERT_TRUE(non_nested_task_ran); 185 ASSERT_TRUE(non_nested_task_ran);
179 } 186 }
180 187
181 } // namespace content 188 } // 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