OLD | NEW |
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 "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/test/test_timeouts.h" |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/test/automation/browser_proxy.h" | 10 #include "chrome/test/automation/browser_proxy.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); | 81 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); |
82 ASSERT_EQ(1, window_count); | 82 ASSERT_EQ(1, window_count); |
83 | 83 |
84 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); | 84 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); |
85 } | 85 } |
86 | 86 |
87 bool WaitForProcessCountToBe(int tabs, int workers) { | 87 bool WaitForProcessCountToBe(int tabs, int workers) { |
88 // The 1 is for the browser process. | 88 // The 1 is for the browser process. |
89 int number_of_processes = 1 + workers + | 89 int number_of_processes = 1 + workers + |
90 (ProxyLauncher::in_process_renderer() ? 0 : tabs); | 90 (ProxyLauncher::in_process_renderer() ? 0 : tabs); |
91 #if defined(OS_LINUX) | 91 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
92 // On Linux, we also have a zygote process and a sandbox host process. | 92 // On Unix, we also have a zygote process and a sandbox host process. |
93 number_of_processes += 2; | 93 number_of_processes += 2; |
94 #endif | 94 #endif |
95 | 95 |
96 int cur_process_count; | 96 int cur_process_count; |
97 for (int i = 0; i < 100; ++i) { | 97 for (int i = 0; i < 100; ++i) { |
98 cur_process_count = 0; | 98 cur_process_count = 0; |
99 if (!GetBrowserProcessCount(&cur_process_count)) | 99 if (!GetBrowserProcessCount(&cur_process_count)) |
100 return false; | 100 return false; |
101 if (cur_process_count == number_of_processes) | 101 if (cur_process_count == number_of_processes) |
102 return true; | 102 return true; |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 RunWorkerFileSystemLayoutTest("file-writer-truncate-extend.html"); | 819 RunWorkerFileSystemLayoutTest("file-writer-truncate-extend.html"); |
820 } | 820 } |
821 | 821 |
822 TEST_F(WorkerFileSystemTest, FileWriterSyncTruncateExtend) { | 822 TEST_F(WorkerFileSystemTest, FileWriterSyncTruncateExtend) { |
823 RunWorkerFileSystemLayoutTest("file-writer-sync-truncate-extend.html"); | 823 RunWorkerFileSystemLayoutTest("file-writer-sync-truncate-extend.html"); |
824 } | 824 } |
825 | 825 |
826 TEST_F(WorkerFileSystemTest, FileWriterSyncWriteOverlapped) { | 826 TEST_F(WorkerFileSystemTest, FileWriterSyncWriteOverlapped) { |
827 RunWorkerFileSystemLayoutTest("file-writer-sync-write-overlapped.html"); | 827 RunWorkerFileSystemLayoutTest("file-writer-sync-write-overlapped.html"); |
828 } | 828 } |
OLD | NEW |