| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/mac/scoped_nsautorelease_pool.h" | |
| 17 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 18 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 19 #include "base/test/test_suite.h" | 18 #include "base/test/test_suite.h" |
| 20 #include "webkit/glue/webkit_glue.h" | 19 #include "webkit/glue/webkit_glue.h" |
| 21 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 20 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
| 22 #include "webkit/tools/test_shell/test_shell.h" | 21 #include "webkit/tools/test_shell/test_shell.h" |
| 23 #include "webkit/tools/test_shell/test_shell_platform_delegate.h" | 22 #include "webkit/tools/test_shell/test_shell_platform_delegate.h" |
| 24 #include "webkit/tools/test_shell/test_shell_switches.h" | 23 #include "webkit/tools/test_shell/test_shell_switches.h" |
| 25 #include "webkit/tools/test_shell/test_shell_test.h" | 24 #include "webkit/tools/test_shell/test_shell_test.h" |
| 26 #include "webkit/tools/test_shell/test_shell_webkit_init.h" | 25 #include "webkit/tools/test_shell/test_shell_webkit_init.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 28 | 27 |
| 29 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
| 30 #include "base/mac/mac_util.h" | 29 #include "base/mac/mac_util.h" |
| 30 #include "base/mac/scoped_nsautorelease_pool.h" |
| 31 #include "base/path_service.h" | 31 #include "base/path_service.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 const char* const TestShellTest::kJavascriptDelayExitScript = | 34 const char* const TestShellTest::kJavascriptDelayExitScript = |
| 35 "<script>" | 35 "<script>" |
| 36 "window.layoutTestController.waitUntilDone();" | 36 "window.layoutTestController.waitUntilDone();" |
| 37 "window.addEventListener('load', function() {" | 37 "window.addEventListener('load', function() {" |
| 38 " var x = document.body.clientWidth;" // Force a document layout | 38 " var x = document.body.clientWidth;" // Force a document layout |
| 39 " window.layoutTestController.notifyDone();" | 39 " window.layoutTestController.notifyDone();" |
| 40 "});" | 40 "});" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Initialize WebKit for this scope. | 100 // Initialize WebKit for this scope. |
| 101 TestShellWebKitInit test_shell_webkit_init_; | 101 TestShellWebKitInit test_shell_webkit_init_; |
| 102 | 102 |
| 103 TestShellPlatformDelegate platform_delegate_; | 103 TestShellPlatformDelegate platform_delegate_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(TestShellTestSuite); | 105 DISALLOW_COPY_AND_ASSIGN(TestShellTestSuite); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 int main(int argc, char** argv) { | 108 int main(int argc, char** argv) { |
| 109 #if defined(OS_MACOSX) |
| 109 base::mac::ScopedNSAutoreleasePool scoped_pool; | 110 base::mac::ScopedNSAutoreleasePool scoped_pool; |
| 111 #endif |
| 110 | 112 |
| 111 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); | 113 TestShellPlatformDelegate::PreflightArgs(&argc, &argv); |
| 112 return TestShellTestSuite(argc, argv).Run(); | 114 return TestShellTestSuite(argc, argv).Run(); |
| 113 } | 115 } |
| OLD | NEW |