OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <math.h> |
7 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
8 #include <algorithm> | 9 #include <algorithm> |
9 #include <vector> | 10 #include <vector> |
10 #include "base/logging.h" | 11 #include "base/logging.h" |
11 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
12 #include "base/platform_thread.h" | 13 #include "base/platform_thread.h" |
13 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
14 #include "base/thread.h" | 15 #include "base/thread.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 532 |
532 TEST_F(MessagePumpGLibTest, TestGtkLoop) { | 533 TEST_F(MessagePumpGLibTest, TestGtkLoop) { |
533 // Tests that events and posted tasks are correctly exectuted if the message | 534 // Tests that events and posted tasks are correctly exectuted if the message |
534 // loop is not run by MessageLoop::Run() but by a straight Gtk loop. | 535 // loop is not run by MessageLoop::Run() but by a straight Gtk loop. |
535 // Note that in this case we don't make strong guarantees about niceness | 536 // Note that in this case we don't make strong guarantees about niceness |
536 // between events and posted tasks. | 537 // between events and posted tasks. |
537 loop()->PostTask(FROM_HERE, | 538 loop()->PostTask(FROM_HERE, |
538 NewRunnableFunction(TestGtkLoopInternal, injector())); | 539 NewRunnableFunction(TestGtkLoopInternal, injector())); |
539 loop()->Run(); | 540 loop()->Run(); |
540 } | 541 } |
OLD | NEW |