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

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

Issue 23531034: [NaCl SDK] Don't exit from nacl_io_test before posting message to JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/example.js ('k') | no next file » | 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 virtual void OnTestProgramEnd(const ::testing::UnitTest&) { 54 virtual void OnTestProgramEnd(const ::testing::UnitTest&) {
55 pp::Instance(PSGetInstanceId()).PostMessage("testend"); 55 pp::Instance(PSGetInstanceId()).PostMessage("testend");
56 } 56 }
57 }; 57 };
58 58
59 int example_main(int argc, char* argv[]) { 59 int example_main(int argc, char* argv[]) {
60 ::testing::InitGoogleTest(&argc, argv); 60 ::testing::InitGoogleTest(&argc, argv);
61 ::testing::UnitTest::GetInstance()->listeners() 61 ::testing::UnitTest::GetInstance()->listeners()
62 .Append(new GTestEventListener()); 62 .Append(new GTestEventListener());
63 return RUN_ALL_TESTS(); 63 int result = 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;
64 } 72 }
65 73
66 // Register the function to call once the Instance Object is initialized. 74 // Register the function to call once the Instance Object is initialized.
67 // see: pappi_simple/ps_main.h 75 // see: pappi_simple/ps_main.h
68 PPAPI_SIMPLE_REGISTER_MAIN(example_main); 76 PPAPI_SIMPLE_REGISTER_MAIN(example_main);
69 77
70 #endif 78 #endif
OLDNEW
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/example.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698