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

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

Issue 8879009: In ppapi/tests: |... const*| -> |const ...*| (for consistency). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « ppapi/tests/test_uma.cc ('k') | ppapi/tests/test_var.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 "ppapi/tests/test_utils.h" 5 #include "ppapi/tests/test_utils.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #if defined(_MSC_VER) 8 #if defined(_MSC_VER)
9 #include <windows.h> 9 #include <windows.h>
10 #else 10 #else
11 #include <unistd.h> 11 #include <unistd.h>
12 #endif 12 #endif
13 13
14 #include "ppapi/c/pp_errors.h" 14 #include "ppapi/c/pp_errors.h"
15 #include "ppapi/cpp/module.h" 15 #include "ppapi/cpp/module.h"
16 16
17 const int kActionTimeoutMs = 10000; 17 const int kActionTimeoutMs = 10000;
18 18
19 const PPB_Testing_Dev* GetTestingInterface() { 19 const PPB_Testing_Dev* GetTestingInterface() {
20 static const PPB_Testing_Dev* g_testing_interface = 20 static const PPB_Testing_Dev* g_testing_interface =
21 reinterpret_cast<PPB_Testing_Dev const*>( 21 static_cast<const PPB_Testing_Dev*>(
22 pp::Module::Get()->GetBrowserInterface(PPB_TESTING_DEV_INTERFACE)); 22 pp::Module::Get()->GetBrowserInterface(PPB_TESTING_DEV_INTERFACE));
23 return g_testing_interface; 23 return g_testing_interface;
24 } 24 }
25 25
26 std::string ReportError(const char* method, int32_t error) { 26 std::string ReportError(const char* method, int32_t error) {
27 char error_as_string[12]; 27 char error_as_string[12];
28 sprintf(error_as_string, "%d", static_cast<int>(error)); 28 sprintf(error_as_string, "%d", static_cast<int>(error));
29 std::string result = method + std::string(" failed with error: ") + 29 std::string result = method + std::string(" failed with error: ") +
30 error_as_string; 30 error_as_string;
31 return result; 31 return result;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 TestCompletionCallback* callback = 80 TestCompletionCallback* callback =
81 static_cast<TestCompletionCallback*>(user_data); 81 static_cast<TestCompletionCallback*>(user_data);
82 callback->result_ = result; 82 callback->result_ = result;
83 callback->have_result_ = true; 83 callback->have_result_ = true;
84 callback->run_count_++; 84 callback->run_count_++;
85 if (callback->post_quit_task_) { 85 if (callback->post_quit_task_) {
86 callback->post_quit_task_ = false; 86 callback->post_quit_task_ = false;
87 GetTestingInterface()->QuitMessageLoop(callback->instance_); 87 GetTestingInterface()->QuitMessageLoop(callback->instance_);
88 } 88 }
89 } 89 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_uma.cc ('k') | ppapi/tests/test_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698