| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/browser/layout_test/layout_test_browser_main.h" | 5 #include "content/shell/browser/layout_test/layout_test_browser_main.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/run_loop.h" |
| 16 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
| 17 #include "base/strings/sys_string_conversions.h" | 18 #include "base/strings/sys_string_conversions.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/thread_task_runner_handle.h" | 20 #include "base/thread_task_runner_handle.h" |
| 20 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
| 21 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 22 #include "content/public/browser/browser_main_runner.h" | 23 #include "content/public/browser/browser_main_runner.h" |
| 23 #include "content/public/common/url_constants.h" | 24 #include "content/public/common/url_constants.h" |
| 24 #include "content/shell/browser/layout_test/blink_test_controller.h" | 25 #include "content/shell/browser/layout_test/blink_test_controller.h" |
| 25 #include "content/shell/browser/layout_test/test_info_extractor.h" | 26 #include "content/shell/browser/layout_test/test_info_extractor.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 switches::kCheckLayoutTestSysDeps)) { | 136 switches::kCheckLayoutTestSysDeps)) { |
| 136 base::ThreadTaskRunnerHandle::Get()->PostTask( | 137 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 137 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | 138 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 138 main_runner->Run(); | 139 main_runner->Run(); |
| 139 content::Shell::CloseAllWindows(); | 140 content::Shell::CloseAllWindows(); |
| 140 main_runner->Shutdown(); | 141 main_runner->Shutdown(); |
| 141 return 0; | 142 return 0; |
| 142 } | 143 } |
| 143 | 144 |
| 144 exit_code = RunTests(main_runner); | 145 exit_code = RunTests(main_runner); |
| 146 base::RunLoop().RunUntilIdle(); |
| 145 | 147 |
| 146 #if !defined(OS_ANDROID) | 148 #if !defined(OS_ANDROID) |
| 147 main_runner->Shutdown(); | 149 main_runner->Shutdown(); |
| 148 #endif | 150 #endif |
| 149 | 151 |
| 150 return exit_code; | 152 return exit_code; |
| 151 } | 153 } |
| OLD | NEW |