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

Side by Side Diff: ppapi/tests/test_post_message.cc

Issue 7706011: Use precompiled headers for most large projects. (Closed) Base URL: ssh://joi@192.168.1.201/home/joi/c/chrome/src@master
Patch Set: Created 9 years, 4 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
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 "ppapi/tests/test_post_message.h" 5 #include "ppapi/tests/test_post_message.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/dev/ppb_testing_dev.h" 9 #include "ppapi/c/dev/ppb_testing_dev.h"
10 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
11 #include "ppapi/cpp/dev/scriptable_object_deprecated.h" 11 #include "ppapi/cpp/dev/scriptable_object_deprecated.h"
12 #include "ppapi/cpp/instance.h" 12 #include "ppapi/cpp/instance.h"
13 #include "ppapi/cpp/var.h" 13 #include "ppapi/cpp/var.h"
14 #include "ppapi/tests/test_utils.h" 14 #include "ppapi/tests/test_utils.h"
15 #include "ppapi/tests/testing_instance.h" 15 #include "ppapi/tests/testing_instance.h"
16 16
17 // Windows defines 'PostMessage', so we have to undef it.
18 #ifdef PostMessage
19 #undef PostMessage
20 #endif
21
22 REGISTER_TEST_CASE(PostMessage); 17 REGISTER_TEST_CASE(PostMessage);
23 18
24 namespace { 19 namespace {
25 20
26 const char kTestString[] = "Hello world!"; 21 const char kTestString[] = "Hello world!";
27 const bool kTestBool = true; 22 const bool kTestBool = true;
28 const int32_t kTestInt = 42; 23 const int32_t kTestInt = 42;
29 const double kTestDouble = 42.0; 24 const double kTestDouble = 42.0;
30 const int32_t kThreadsToRun = 10; 25 const int32_t kThreadsToRun = 10;
31 26
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Therefore, we will do CallOnMainThread to yield control. That event should 242 // Therefore, we will do CallOnMainThread to yield control. That event should
248 // fire, but we should see no messages when we return. 243 // fire, but we should see no messages when we return.
249 TestCompletionCallback callback(instance_->pp_instance()); 244 TestCompletionCallback callback(instance_->pp_instance());
250 pp::Module::Get()->core()->CallOnMainThread(0, callback); 245 pp::Module::Get()->core()->CallOnMainThread(0, callback);
251 callback.WaitForResult(); 246 callback.WaitForResult();
252 ASSERT_TRUE(message_data_.empty()); 247 ASSERT_TRUE(message_data_.empty());
253 248
254 PASS(); 249 PASS();
255 } 250 }
256 251
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698