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

Side by Side Diff: chrome/test/ui_test_utils.cc

Issue 6976055: More POSIX support for Chromium, consisting mostly of broadening ifdefs. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « chrome/test/ui/history_uitest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/test/ui_test_utils.h" 5 #include "chrome/test/ui_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 } // namespace 283 } // namespace
284 284
285 void RunMessageLoop() { 285 void RunMessageLoop() {
286 MessageLoopForUI* loop = MessageLoopForUI::current(); 286 MessageLoopForUI* loop = MessageLoopForUI::current();
287 bool did_allow_task_nesting = loop->NestableTasksAllowed(); 287 bool did_allow_task_nesting = loop->NestableTasksAllowed();
288 loop->SetNestableTasksAllowed(true); 288 loop->SetNestableTasksAllowed(true);
289 #if defined(TOOLKIT_VIEWS) 289 #if defined(TOOLKIT_VIEWS)
290 views::AcceleratorHandler handler; 290 views::AcceleratorHandler handler;
291 loop->Run(&handler); 291 loop->Run(&handler);
292 #elif defined(OS_LINUX) 292 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
293 loop->Run(NULL); 293 loop->Run(NULL);
294 #else 294 #else
295 loop->Run(); 295 loop->Run();
296 #endif 296 #endif
297 loop->SetNestableTasksAllowed(did_allow_task_nesting); 297 loop->SetNestableTasksAllowed(did_allow_task_nesting);
298 } 298 }
299 299
300 void RunAllPendingInMessageLoop() { 300 void RunAllPendingInMessageLoop() {
301 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 301 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
302 ui_test_utils::RunMessageLoop(); 302 ui_test_utils::RunMessageLoop();
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 994 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
995 } 995 }
996 996
997 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 997 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
998 DCHECK(bitmap); 998 DCHECK(bitmap);
999 SnapshotTaker taker; 999 SnapshotTaker taker;
1000 return taker.TakeEntirePageSnapshot(rvh, bitmap); 1000 return taker.TakeEntirePageSnapshot(rvh, bitmap);
1001 } 1001 }
1002 1002
1003 } // namespace ui_test_utils 1003 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/ui/history_uitest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698