| OLD | NEW |
| 1 // Copyright (c) 2010 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "base/test/test_timeouts.h" |
| 7 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/worker_host/worker_service.h" | 10 #include "chrome/browser/worker_host/worker_service.h" |
| 10 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
| 11 #include "chrome/test/automation/browser_proxy.h" | 12 #include "chrome/test/automation/browser_proxy.h" |
| 12 #include "chrome/test/automation/tab_proxy.h" | 13 #include "chrome/test/automation/tab_proxy.h" |
| 13 #include "chrome/test/ui/ui_layout_test.h" | 14 #include "chrome/test/ui/ui_layout_test.h" |
| 14 #include "chrome/test/ui_test_utils.h" | 15 #include "chrome/test/ui_test_utils.h" |
| 15 #include "net/test/test_server.h" | 16 #include "net/test/test_server.h" |
| 16 | 17 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // On Linux, we also have a zygote process and a sandbox host process. | 89 // On Linux, we also have a zygote process and a sandbox host process. |
| 89 number_of_processes += 2; | 90 number_of_processes += 2; |
| 90 #endif | 91 #endif |
| 91 | 92 |
| 92 int cur_process_count; | 93 int cur_process_count; |
| 93 for (int i = 0; i < 10; ++i) { | 94 for (int i = 0; i < 10; ++i) { |
| 94 cur_process_count = GetBrowserProcessCount(); | 95 cur_process_count = GetBrowserProcessCount(); |
| 95 if (cur_process_count == number_of_processes) | 96 if (cur_process_count == number_of_processes) |
| 96 return true; | 97 return true; |
| 97 | 98 |
| 98 base::PlatformThread::Sleep(sleep_timeout_ms() / 10); | 99 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms() / 10); |
| 99 } | 100 } |
| 100 | 101 |
| 101 EXPECT_EQ(number_of_processes, cur_process_count); | 102 EXPECT_EQ(number_of_processes, cur_process_count); |
| 102 return false; | 103 return false; |
| 103 } | 104 } |
| 104 | 105 |
| 105 void RunWorkerFastLayoutTest(const std::string& test_case_file_name) { | 106 void RunWorkerFastLayoutTest(const std::string& test_case_file_name) { |
| 106 FilePath fast_test_dir; | 107 FilePath fast_test_dir; |
| 107 fast_test_dir = fast_test_dir.AppendASCII("fast"); | 108 fast_test_dir = fast_test_dir.AppendASCII("fast"); |
| 108 | 109 |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); | 709 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); |
| 709 } | 710 } |
| 710 | 711 |
| 711 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { | 712 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { |
| 712 RunWorkerFileSystemLayoutTest("async-operations.html"); | 713 RunWorkerFileSystemLayoutTest("async-operations.html"); |
| 713 } | 714 } |
| 714 | 715 |
| 715 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { | 716 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { |
| 716 RunWorkerFileSystemLayoutTest("sync-operations.html"); | 717 RunWorkerFileSystemLayoutTest("sync-operations.html"); |
| 717 } | 718 } |
| OLD | NEW |