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

Side by Side Diff: webkit/tools/test_shell/run_all_tests.cc

Issue 3828009: Move scoped_nsdisable_screen_update from base to app/mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « testing/gtest_mac_unittest.mm ('k') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Run all of our test shell tests. This is just an entry point 5 // Run all of our test shell tests. This is just an entry point
6 // to kick off gTest's RUN_ALL_TESTS(). 6 // to kick off gTest's RUN_ALL_TESTS().
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include <windows.h> 11 #include <windows.h>
12 #include <commctrl.h> 12 #include <commctrl.h>
13 #endif 13 #endif
14 14
15 #include "base/at_exit.h" 15 #include "base/at_exit.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/i18n/icu_util.h" 17 #include "base/i18n/icu_util.h"
18 #if defined(OS_MACOSX) 18 #include "base/mac/scoped_nsautorelease_pool.h"
19 #include "base/mac_util.h"
20 #include "base/path_service.h"
21 #endif
22 #include "base/message_loop.h" 19 #include "base/message_loop.h"
23 #include "base/process_util.h" 20 #include "base/process_util.h"
24 #include "base/scoped_nsautorelease_pool.h"
25 #include "webkit/glue/webkit_glue.h" 21 #include "webkit/glue/webkit_glue.h"
26 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 22 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
27 #include "webkit/tools/test_shell/test_shell.h" 23 #include "webkit/tools/test_shell/test_shell.h"
28 #include "webkit/tools/test_shell/test_shell_platform_delegate.h" 24 #include "webkit/tools/test_shell/test_shell_platform_delegate.h"
29 #include "webkit/tools/test_shell/test_shell_switches.h" 25 #include "webkit/tools/test_shell/test_shell_switches.h"
30 #include "webkit/tools/test_shell/test_shell_test.h" 26 #include "webkit/tools/test_shell/test_shell_test.h"
31 #include "webkit/tools/test_shell/test_shell_webkit_init.h" 27 #include "webkit/tools/test_shell/test_shell_webkit_init.h"
32 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
33 29
30 #if defined(OS_MACOSX)
31 #include "base/mac_util.h"
32 #include "base/path_service.h"
33 #endif
34
34 const char* const TestShellTest::kJavascriptDelayExitScript = 35 const char* const TestShellTest::kJavascriptDelayExitScript =
35 "<script>" 36 "<script>"
36 "window.layoutTestController.waitUntilDone();" 37 "window.layoutTestController.waitUntilDone();"
37 "window.addEventListener('load', function() {" 38 "window.addEventListener('load', function() {"
38 " var x = document.body.clientWidth;" // Force a document layout 39 " var x = document.body.clientWidth;" // Force a document layout
39 " window.layoutTestController.notifyDone();" 40 " window.layoutTestController.notifyDone();"
40 "});" 41 "});"
41 "</script>"; 42 "</script>";
42 43
43 int main(int argc, char* argv[]) { 44 int main(int argc, char* argv[]) {
44 base::ScopedNSAutoreleasePool autorelease_pool; 45 base::mac::ScopedNSAutoreleasePool autorelease_pool;
45 base::EnableInProcessStackDumping(); 46 base::EnableInProcessStackDumping();
46 base::EnableTerminationOnHeapCorruption(); 47 base::EnableTerminationOnHeapCorruption();
47 // Some unittests may use base::Singleton<>, thus we need to instanciate 48 // Some unittests may use base::Singleton<>, thus we need to instanciate
48 // the AtExitManager or else we will leak objects. 49 // the AtExitManager or else we will leak objects.
49 base::AtExitManager at_exit_manager; 50 base::AtExitManager at_exit_manager;
50 51
51 #if defined(OS_MACOSX) 52 #if defined(OS_MACOSX)
52 FilePath path; 53 FilePath path;
53 PathService::Get(base::DIR_EXE, &path); 54 PathService::Get(base::DIR_EXE, &path);
54 path = path.AppendASCII("TestShell.app"); 55 path = path.AppendASCII("TestShell.app");
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 testing::InitGoogleTest(&argc, argv); 98 testing::InitGoogleTest(&argc, argv);
98 int result = RUN_ALL_TESTS(); 99 int result = RUN_ALL_TESTS();
99 100
100 TestShell::ShutdownTestShell(); 101 TestShell::ShutdownTestShell();
101 TestShell::CleanupLogging(); 102 TestShell::CleanupLogging();
102 103
103 CommandLine::Reset(); 104 CommandLine::Reset();
104 105
105 return result; 106 return result;
106 } 107 }
OLDNEW
« no previous file with comments | « testing/gtest_mac_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698