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

Side by Side Diff: base/message_pump_glib_unittest.cc

Issue 3176026: FBTF: Remove unneeded headers from base/ (part 7) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « base/lock_impl_win.cc ('k') | base/scoped_variant_win.h » ('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) 2009 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/message_pump_glib.h" 5 #include "base/message_pump_glib.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/logging.h"
14 #include "base/message_loop.h" 13 #include "base/message_loop.h"
15 #include "base/platform_thread.h" 14 #include "base/platform_thread.h"
16 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
17 #include "base/thread.h" 16 #include "base/thread.h"
18 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
19 18
20 namespace { 19 namespace {
21 20
22 // This class injects dummy "events" into the GLib loop. When "handled" these 21 // This class injects dummy "events" into the GLib loop. When "handled" these
23 // events can run tasks. This is intended to mock gtk events (the corresponding 22 // events can run tasks. This is intended to mock gtk events (the corresponding
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 536
538 TEST_F(MessagePumpGLibTest, TestGtkLoop) { 537 TEST_F(MessagePumpGLibTest, TestGtkLoop) {
539 // Tests that events and posted tasks are correctly exectuted if the message 538 // Tests that events and posted tasks are correctly exectuted if the message
540 // loop is not run by MessageLoop::Run() but by a straight Gtk loop. 539 // loop is not run by MessageLoop::Run() but by a straight Gtk loop.
541 // Note that in this case we don't make strong guarantees about niceness 540 // Note that in this case we don't make strong guarantees about niceness
542 // between events and posted tasks. 541 // between events and posted tasks.
543 loop()->PostTask(FROM_HERE, 542 loop()->PostTask(FROM_HERE,
544 NewRunnableFunction(TestGtkLoopInternal, injector())); 543 NewRunnableFunction(TestGtkLoopInternal, injector()));
545 loop()->Run(); 544 loop()->Run();
546 } 545 }
OLDNEW
« no previous file with comments | « base/lock_impl_win.cc ('k') | base/scoped_variant_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698