OLD | NEW |
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 Loading... |
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. Only test one to make the test more |
55 // disabled, the interface should return NULL. | 55 // robust as interfaces change. |
56 CHECK(GetBrowserInterface(PPB_BUFFER_DEV_INTERFACE) == NULL); | 56 EXPECT(GetBrowserInterface(PPB_VAR_DEPRECATED_INTERFACE) != NULL); |
57 CHECK(GetBrowserInterface(PPB_CHAR_SET_DEV_INTERFACE) == NULL); | |
58 CHECK(GetBrowserInterface(PPB_CONSOLE_DEV_INTERFACE) == NULL); | |
59 CHECK(GetBrowserInterface(PPB_CONTEXT_3D_DEV_INTERFACE) == NULL); | |
60 CHECK(GetBrowserInterface(PPB_CRYPTO_DEV_INTERFACE) == NULL); | |
61 CHECK(GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE) == NULL); | |
62 CHECK(GetBrowserInterface(PPB_DIRECTORYREADER_DEV_INTERFACE) == NULL); | |
63 CHECK(GetBrowserInterface(PPB_FILECHOOSER_DEV_INTERFACE) == NULL); | |
64 CHECK(GetBrowserInterface(PPB_FIND_DEV_INTERFACE) == NULL); | |
65 CHECK(GetBrowserInterface(PPB_FONT_DEV_INTERFACE) == NULL); | |
66 CHECK(GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE) == NULL); | |
67 CHECK(GetBrowserInterface( | |
68 PPB_GLES_CHROMIUM_TEXTURE_MAPPING_DEV_INTERFACE) == NULL); | |
69 CHECK(GetBrowserInterface(PPB_LAYER_COMPOSITOR_DEV_INTERFACE) == NULL); | |
70 CHECK(GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE) == NULL); | |
71 CHECK(GetBrowserInterface(PPB_MOUSELOCK_DEV_INTERFACE) == NULL); | |
72 CHECK(GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE) == NULL); | |
73 CHECK(GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE) == NULL); | |
74 CHECK(GetBrowserInterface(PPB_TESTING_DEV_INTERFACE) == NULL); | |
75 CHECK(GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE) == NULL); | |
76 CHECK(GetBrowserInterface(PPB_URLUTIL_DEV_INTERFACE) == NULL); | |
77 CHECK(GetBrowserInterface(PPB_VAR_DEPRECATED_INTERFACE) == NULL); | |
78 CHECK(GetBrowserInterface(PPB_VIDEODECODER_DEV_INTERFACE) == NULL); | |
79 CHECK(GetBrowserInterface(PPB_WIDGET_DEV_INTERFACE) == NULL); | |
80 CHECK(GetBrowserInterface(PPB_ZOOM_DEV_INTERFACE) == NULL); | |
81 | 57 |
82 TEST_PASSED; | 58 TEST_PASSED; |
83 } | 59 } |
84 | 60 |
85 } // namespace | 61 } // namespace |
86 | 62 |
87 void SetupTests() { | 63 void SetupTests() { |
88 RegisterTest("TestGetDevInterfaces", TestGetDevInterfaces); | 64 RegisterTest("TestGetDevInterfaces", TestGetDevInterfaces); |
89 } | 65 } |
90 | 66 |
91 void SetupPluginInterfaces() { | 67 void SetupPluginInterfaces() { |
92 // none | 68 // none |
93 } | 69 } |
OLD | NEW |