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

Side by Side Diff: chrome/test/data/nacl/pnacl_dyncode_syscall_disabled/pnacl_dyncode_syscall_disabled.cc

Issue 14154005: Add dyncode syscall disabled test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 7 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <errno.h>
6 #include <nacl/nacl_dyncode.h>
7 #include <stdio.h>
8 #include <string.h>
9 #include <unistd.h>
10
11
12 #include "native_client/src/shared/platform/nacl_check.h"
13 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h"
14 #include "native_client/tests/ppapi_test_lib/test_interface.h"
15
16 namespace {
17
18 void TestDyncodeCreate(void) {
19 EXPECT(nacl_dyncode_create(NULL, NULL, 0) == -1);
20 EXPECT(errno == ENOSYS);
21
22 TEST_PASSED;
23 }
24
25 void TestDyncodeModify(void) {
26 EXPECT(nacl_dyncode_modify(NULL, NULL, 0) == -1);
27 EXPECT(errno == ENOSYS);
28
29 TEST_PASSED;
30 }
31
32 void TestDyncodeDelete(void) {
33 EXPECT(nacl_dyncode_delete(NULL, 0) == -1);
34 EXPECT(errno == ENOSYS);
35
36 TEST_PASSED;
37 }
38
39 } // namespace
40
41 void SetupTests() {
42 RegisterTest("TestDyncodeCreate", TestDyncodeCreate);
43 RegisterTest("TestDyncodeModify", TestDyncodeModify);
44 RegisterTest("TestDyncodeDelete", TestDyncodeDelete);
45 }
46
47 void SetupPluginInterfaces() {
48 // none
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698