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

Side by Side Diff: chrome/worker/worker_uitest.cc

Issue 5967003: Refactor UITestBase/ProxyLauncher. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add POD struct to hold some launcher variables. Created 9 years, 11 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
OLDNEW
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 #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/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/worker_host/worker_service.h" 9 #include "chrome/browser/worker_host/worker_service.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ASSERT_TRUE(incognito->RunCommand(IDC_CLOSE_WINDOW)); 77 ASSERT_TRUE(incognito->RunCommand(IDC_CLOSE_WINDOW));
78 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); 78 ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count));
79 ASSERT_EQ(1, window_count); 79 ASSERT_EQ(1, window_count);
80 80
81 ASSERT_STREQ(kTestCompleteSuccess, value.c_str()); 81 ASSERT_STREQ(kTestCompleteSuccess, value.c_str());
82 } 82 }
83 83
84 bool WaitForProcessCountToBe(int tabs, int workers) { 84 bool WaitForProcessCountToBe(int tabs, int workers) {
85 // The 1 is for the browser process. 85 // The 1 is for the browser process.
86 int number_of_processes = 1 + workers + 86 int number_of_processes = 1 + workers +
87 (UITest::in_process_renderer() ? 0 : tabs); 87 (ProxyLauncher::in_process_renderer() ? 0 : tabs);
88 #if defined(OS_LINUX) 88 #if defined(OS_LINUX)
89 // 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.
90 number_of_processes += 2; 90 number_of_processes += 2;
91 #endif 91 #endif
92 92
93 int cur_process_count; 93 int cur_process_count;
94 for (int i = 0; i < 10; ++i) { 94 for (int i = 0; i < 10; ++i) {
95 cur_process_count = GetBrowserProcessCount(); 95 cur_process_count = GetBrowserProcessCount();
96 if (cur_process_count == number_of_processes) 96 if (cur_process_count == number_of_processes)
97 return true; 97 return true;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html"); 709 RunWorkerFileSystemLayoutTest("simple-persistent-sync.html");
710 } 710 }
711 711
712 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) { 712 TEST_F(WorkerTest, DISABLED_WorkerFileSystemAsyncOperationsTest) {
713 RunWorkerFileSystemLayoutTest("async-operations.html"); 713 RunWorkerFileSystemLayoutTest("async-operations.html");
714 } 714 }
715 715
716 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) { 716 TEST_F(WorkerTest, DISABLED_WorkerFileSystemSyncOperationsTest) {
717 RunWorkerFileSystemLayoutTest("sync-operations.html"); 717 RunWorkerFileSystemLayoutTest("sync-operations.html");
718 } 718 }
OLDNEW
« chrome/test/automation/proxy_launcher.h ('K') | « chrome/test/ui/ui_test_suite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698