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

Unified Diff: tests/testing_instance.cc

Issue 3993001: Run Pepper unit tests in Native Client, part 1 (pepper repo).... (Closed) Base URL: http://ppapi.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « 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: tests/testing_instance.cc
===================================================================
--- tests/testing_instance.cc (revision 311)
+++ 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,15 +138,17 @@
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>");
}
html.append("</dl>");
html.append("<button onclick='RunAll()'>Run All Tests</button>");
- LogHTML(html);
+ LogHTML(html);
}
void TestingInstance::LogError(const std::string& text) {
« no previous file with comments | « tests/testing_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698