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

Side by Side Diff: chrome/browser/printing/printing_layout_uitest.cc

Issue 6001010: Move platform_thread to base/threading and put in the base namespace. I left ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/test/test_file_util.h" 7 #include "base/test/test_file_util.h"
8 #include "base/threading/simple_thread.h" 8 #include "base/threading/simple_thread.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/ui/ui_test.h" 10 #include "chrome/test/ui/ui_test.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 verification_name << "\""; 157 verification_name << "\"";
158 prn_file = file; 158 prn_file = file;
159 found_prn = true; 159 found_prn = true;
160 file_util::Delete(file, false); 160 file_util::Delete(file, false);
161 continue; 161 continue;
162 } 162 }
163 EXPECT_TRUE(false); 163 EXPECT_TRUE(false);
164 } 164 }
165 if (found_emf && found_prn) 165 if (found_emf && found_prn)
166 break; 166 break;
167 PlatformThread::Sleep(100); 167 base::PlatformThread::Sleep(100);
168 } 168 }
169 EXPECT_TRUE(found_emf) << ".PRN file is: " << prn_file; 169 EXPECT_TRUE(found_emf) << ".PRN file is: " << prn_file;
170 EXPECT_TRUE(found_prn) << ".EMF file is: " << emf_file; 170 EXPECT_TRUE(found_prn) << ".EMF file is: " << emf_file;
171 return emf_file; 171 return emf_file;
172 } 172 }
173 173
174 static bool GenerateFiles() { 174 static bool GenerateFiles() {
175 return CommandLine::ForCurrentProcess()->HasSwitch(kGenerateSwitch); 175 return CommandLine::ForCurrentProcess()->HasSwitch(kGenerateSwitch);
176 } 176 }
177 177
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 for (;;) { 249 for (;;) {
250 // First enumerate the windows. 250 // First enumerate the windows.
251 dialog_window = FindDialogWindow(owner_process_); 251 dialog_window = FindDialogWindow(owner_process_);
252 252
253 // Try to close it. 253 // Try to close it.
254 if (dialog_window) { 254 if (dialog_window) {
255 if (CloseDialogWindow(dialog_window)) { 255 if (CloseDialogWindow(dialog_window)) {
256 break; 256 break;
257 } 257 }
258 } 258 }
259 PlatformThread::Sleep(10); 259 base::PlatformThread::Sleep(10);
260 } 260 }
261 261
262 // Now verify that it indeed closed itself. 262 // Now verify that it indeed closed itself.
263 while (IsWindow(dialog_window)) { 263 while (IsWindow(dialog_window)) {
264 CloseDialogWindow(dialog_window); 264 CloseDialogWindow(dialog_window);
265 PlatformThread::Sleep(10); 265 base::PlatformThread::Sleep(10);
266 } 266 }
267 } 267 }
268 268
269 DWORD owner_process() { return owner_process_; } 269 DWORD owner_process() { return owner_process_; }
270 270
271 private: 271 private:
272 DWORD owner_process_; 272 DWORD owner_process_;
273 }; 273 };
274 274
275 } // namespace 275 } // namespace
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 // Force a navigation elsewhere to verify that it's fine with it. 415 // Force a navigation elsewhere to verify that it's fine with it.
416 url = test_server.GetURL("files/printing/test1.html"); 416 url = test_server.GetURL("files/printing/test1.html");
417 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, 417 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
418 tab_proxy->NavigateToURL(url)); 418 tab_proxy->NavigateToURL(url));
419 } 419 }
420 CloseBrowserAndServer(); 420 CloseBrowserAndServer();
421 421
422 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; 422 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe";
423 } 423 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698