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

Side by Side Diff: ppapi/native_client/tests/ppapi_browser/ppb_dev/ppapi_ppb_dev.cc

Issue 8301006: Packaged (CRX) extensions shouldn't be able to get 'dev' interfaces in NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Test cases for PPAPI Dev interfaces. 5 // Test cases for PPAPI Dev interfaces.
6 // 6 //
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "native_client/src/include/nacl_macros.h" 10 #include "native_client/src/include/nacl_macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "ppapi/c/dev/ppb_zoom_dev.h" 43 #include "ppapi/c/dev/ppb_zoom_dev.h"
44 44
45 45
46 namespace { 46 namespace {
47 47
48 //////////////////////////////////////////////////////////////////////////////// 48 ////////////////////////////////////////////////////////////////////////////////
49 // Test Cases 49 // Test Cases
50 //////////////////////////////////////////////////////////////////////////////// 50 ////////////////////////////////////////////////////////////////////////////////
51 51
52 void TestGetDevInterfaces() { 52 void TestGetDevInterfaces() {
53 // This test is run only w/ NACL_ENABLE_PPAPI_DEV=0, which should 53 // This test is run as a simple embedded .nexe with --enable-nacl. It should
54 // turn off and disable the PPAPI developer interfaces. When they are 54 // have access to all dev interfaces.
sehr 2011/10/14 21:38:32 Shouldn't we have a corresponding test that these
bbudge 2011/10/14 22:03:27 Yes, but it would be very difficult to set this up
55 // disabled, the interface should return NULL. 55 CHECK(GetBrowserInterface(PPB_BUFFER_DEV_INTERFACE) != NULL);
56 CHECK(GetBrowserInterface(PPB_BUFFER_DEV_INTERFACE) == NULL); 56 CHECK(GetBrowserInterface(PPB_CHAR_SET_DEV_INTERFACE) != NULL);
57 CHECK(GetBrowserInterface(PPB_CHAR_SET_DEV_INTERFACE) == NULL); 57 CHECK(GetBrowserInterface(PPB_CONSOLE_DEV_INTERFACE) != NULL);
58 CHECK(GetBrowserInterface(PPB_CONSOLE_DEV_INTERFACE) == NULL); 58 CHECK(GetBrowserInterface(PPB_CONTEXT_3D_DEV_INTERFACE) != NULL);
59 CHECK(GetBrowserInterface(PPB_CONTEXT_3D_DEV_INTERFACE) == NULL); 59 CHECK(GetBrowserInterface(PPB_CRYPTO_DEV_INTERFACE) != NULL);
60 CHECK(GetBrowserInterface(PPB_CRYPTO_DEV_INTERFACE) == NULL); 60 CHECK(GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE) != NULL);
61 CHECK(GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE) == NULL); 61 CHECK(GetBrowserInterface(PPB_DIRECTORYREADER_DEV_INTERFACE) != NULL);
62 CHECK(GetBrowserInterface(PPB_DIRECTORYREADER_DEV_INTERFACE) == NULL); 62 CHECK(GetBrowserInterface(PPB_FILECHOOSER_DEV_INTERFACE) != NULL);
63 CHECK(GetBrowserInterface(PPB_FILECHOOSER_DEV_INTERFACE) == NULL); 63 CHECK(GetBrowserInterface(PPB_FIND_DEV_INTERFACE) != NULL);
64 CHECK(GetBrowserInterface(PPB_FIND_DEV_INTERFACE) == NULL); 64 CHECK(GetBrowserInterface(PPB_FONT_DEV_INTERFACE) != NULL);
65 CHECK(GetBrowserInterface(PPB_FONT_DEV_INTERFACE) == NULL); 65 CHECK(GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE) != NULL);
66 CHECK(GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE) == NULL);
67 CHECK(GetBrowserInterface( 66 CHECK(GetBrowserInterface(
68 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == NULL); 67 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) != NULL);
69 CHECK(GetBrowserInterface(PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == NULL); 68 CHECK(GetBrowserInterface(PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == NULL);
70 CHECK(GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE) == NULL); 69 CHECK(GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE) != NULL);
71 CHECK(GetBrowserInterface(PPB_MOUSELOCK_DEV_INTERFACE) == NULL); 70 CHECK(GetBrowserInterface(PPB_MOUSELOCK_DEV_INTERFACE) != NULL);
72 CHECK(GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE) == NULL); 71 CHECK(GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE) != NULL);
73 CHECK(GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE) == NULL); 72 CHECK(GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE) != NULL);
74 CHECK(GetBrowserInterface(PPB_TESTING_DEV_INTERFACE) == NULL); 73 CHECK(GetBrowserInterface(PPB_TESTING_DEV_INTERFACE) != NULL);
75 CHECK(GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE) == NULL); 74 CHECK(GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE) != NULL);
76 CHECK(GetBrowserInterface(PPB_URLUTIL_DEV_INTERFACE) == NULL); 75 CHECK(GetBrowserInterface(PPB_URLUTIL_DEV_INTERFACE) != NULL);
77 CHECK(GetBrowserInterface(PPB_VAR_DEPRECATED_INTERFACE) == NULL); 76 CHECK(GetBrowserInterface(PPB_VAR_DEPRECATED_INTERFACE) != NULL);
78 CHECK(GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE) == NULL); 77 CHECK(GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE) != NULL);
79 CHECK(GetBrowserInterface(PPB_WIDGET_DEV_INTERFACE) == NULL); 78 CHECK(GetBrowserInterface(PPB_WIDGET_DEV_INTERFACE) != NULL);
80 CHECK(GetBrowserInterface(PPB_ZOOM_DEV_INTERFACE) == NULL); 79 CHECK(GetBrowserInterface(PPB_ZOOM_DEV_INTERFACE) != NULL);
81 80
82 TEST_PASSED; 81 TEST_PASSED;
83 } 82 }
84 83
85 } // namespace 84 } // namespace
86 85
87 void SetupTests() { 86 void SetupTests() {
88 RegisterTest("TestGetDevInterfaces", TestGetDevInterfaces); 87 RegisterTest("TestGetDevInterfaces", TestGetDevInterfaces);
89 } 88 }
90 89
91 void SetupPluginInterfaces() { 90 void SetupPluginInterfaces() {
92 // none 91 // none
93 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698