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

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/main.cc

Issue 61213002: [NaCl SDK] Run nacl_io_socket_test on the bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <string> 5 #include <string>
6 6
7 #include "gtest/gtest.h" 7 #include "gtest/gtest.h"
8 8
9 #if defined(SEL_LDR) 9 #if defined(SEL_LDR)
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 pp::Instance(PSGetInstanceId()).PostMessage(msg.str()); 43 pp::Instance(PSGetInstanceId()).PostMessage(msg.str());
44 } 44 }
45 } 45 }
46 46
47 virtual void OnTestEnd(const ::testing::TestInfo& test_info) { 47 virtual void OnTestEnd(const ::testing::TestInfo& test_info) {
48 std::stringstream msg; 48 std::stringstream msg;
49 msg << "end:" << test_info.test_case_name() << "." << test_info.name() 49 msg << "end:" << test_info.test_case_name() << "." << test_info.name()
50 << "," << (test_info.result()->Failed() ? "failed" : "ok"); 50 << "," << (test_info.result()->Failed() ? "failed" : "ok");
51 pp::Instance(PSGetInstanceId()).PostMessage(msg.str()); 51 pp::Instance(PSGetInstanceId()).PostMessage(msg.str());
52 } 52 }
53
54 virtual void OnTestProgramEnd(const ::testing::UnitTest&) {
55 pp::Instance(PSGetInstanceId()).PostMessage("testend");
56 }
57 }; 53 };
58 54
59 int example_main(int argc, char* argv[]) { 55 int example_main(int argc, char* argv[]) {
60 ::testing::InitGoogleTest(&argc, argv); 56 ::testing::InitGoogleTest(&argc, argv);
61 ::testing::UnitTest::GetInstance()->listeners() 57 ::testing::UnitTest::GetInstance()->listeners()
62 .Append(new GTestEventListener()); 58 .Append(new GTestEventListener());
63 int result = RUN_ALL_TESTS(); 59 return RUN_ALL_TESTS();
64
65 // When running as an automated test, we don't want the final message
66 // ("testend") to be dropped, so don't exit. The web page will kill the
67 // plugin if it needs to.
68 while(1);
69
70 // Silence the warning.
71 return result;
72 } 60 }
73 61
74 // Register the function to call once the Instance Object is initialized. 62 // Register the function to call once the Instance Object is initialized.
75 // see: pappi_simple/ps_main.h 63 // see: pappi_simple/ps_main.h
76 PPAPI_SIMPLE_REGISTER_MAIN(example_main); 64 PPAPI_SIMPLE_REGISTER_MAIN(example_main);
77 65
78 #endif 66 #endif
OLDNEW
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/index.html ('k') | native_client_sdk/src/tests/sdk_util_test/example.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698