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

Side by Side Diff: ppapi/tests/test_case.h

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « ppapi/proxy/flash_menu_resource.cc ('k') | ppapi/tests/test_graphics_2d.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef PPAPI_TESTS_TEST_CASE_H_ 5 #ifndef PPAPI_TESTS_TEST_CASE_H_
6 #define PPAPI_TESTS_TEST_CASE_H_ 6 #define PPAPI_TESTS_TEST_CASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 private: 191 private:
192 void Run() { 192 void Run() {
193 int32_t result = loop_.AttachToCurrentThread(); 193 int32_t result = loop_.AttachToCurrentThread();
194 static_cast<void>(result); // result is not used in the RELEASE build. 194 static_cast<void>(result); // result is not used in the RELEASE build.
195 PP_DCHECK(PP_OK == result); 195 PP_DCHECK(PP_OK == result);
196 result_ = (test_case_->*test_to_run_)(); 196 result_ = (test_case_->*test_to_run_)();
197 // Now give the loop a chance to clean up. 197 // Now give the loop a chance to clean up.
198 loop_.PostQuit(true /* should_destroy */); 198 loop_.PostQuit(true /* should_destroy */);
199 loop_.Run(); 199 loop_.Run();
200 // Tell the main thread to quit its nested message loop, now that the test 200 // Tell the main thread to quit its nested run loop, now that the test
201 // is complete. 201 // is complete.
202 TestCase::QuitMainMessageLoop(instance_); 202 TestCase::QuitMainMessageLoop(instance_);
203 } 203 }
204 204
205 std::string result_; 205 std::string result_;
206 PP_Instance instance_; 206 PP_Instance instance_;
207 T* test_case_; 207 T* test_case_;
208 TestMethodType test_to_run_; 208 TestMethodType test_to_run_;
209 pp::MessageLoop loop_; 209 pp::MessageLoop loop_;
210 }; 210 };
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 #define ASSERT_SUBTEST_SUCCESS(function) \ 736 #define ASSERT_SUBTEST_SUCCESS(function) \
737 do { \ 737 do { \
738 std::string result = (function); \ 738 std::string result = (function); \
739 if (!result.empty()) \ 739 if (!result.empty()) \
740 return TestCase::MakeFailureMessage(__FILE__, __LINE__, result.c_str()); \ 740 return TestCase::MakeFailureMessage(__FILE__, __LINE__, result.c_str()); \
741 } while (false) 741 } while (false)
742 742
743 #define PASS() return std::string() 743 #define PASS() return std::string()
744 744
745 #endif // PPAPI_TESTS_TEST_CASE_H_ 745 #endif // PPAPI_TESTS_TEST_CASE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_menu_resource.cc ('k') | ppapi/tests/test_graphics_2d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698