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

Unified Diff: ppapi/tests/testing_instance.cc

Issue 4991006: Run Pepper unit tests in Native Client.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« ppapi/tests/test_case.html ('K') | « ppapi/tests/testing_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/testing_instance.cc
===================================================================
--- ppapi/tests/testing_instance.cc (revision 66122)
+++ ppapi/tests/testing_instance.cc (working copy)
@@ -18,11 +18,21 @@
TestingInstance::TestingInstance(PP_Instance instance)
: pp::Instance(instance),
current_case_(NULL),
- executed_tests_(false) {
+ executed_tests_(false),
+ nacl_mode_(false) {
callback_factory_.Initialize(this);
}
-bool TestingInstance::Init(uint32_t argc, const char* argn[], const char* argv[]) {
+bool TestingInstance::Init(uint32_t argc,
+ const char* argn[],
+ const char* argv[]) {
+ for (uint32_t i = 0; i < argc; i++) {
+ if (strcmp(argn[i], "mode") == 0) {
+ if (strcmp(argv[i], "nacl") == 0)
+ nacl_mode_ = true;
+ break;
+ }
+ }
// Create the proper test case from the argument.
for (uint32_t i = 0; i < argc; i++) {
if (strcmp(argn[i], "testcase") == 0) {
@@ -128,8 +138,10 @@
std::string html;
html.append("Available test cases: <dl>");
for (size_t i = 0; i < test_cases.size(); ++i) {
- html.append("<dd><a href='?");
+ html.append("<dd><a href='?testcase=");
html.append(test_cases[i]);
+ if (nacl_mode_)
+ html.append("&mode=nacl");
html.append("'>");
html.append(test_cases[i]);
html.append("</a></dd>");
« ppapi/tests/test_case.html ('K') | « ppapi/tests/testing_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698