Changeset 82901 in vbox for trunk/src/VBox
- Timestamp:
- Jan 29, 2020 9:45:11 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r82900 r82901 2940 2940 2941 2941 /* 2942 * Run the test .2942 * Run the tests. 2943 2943 */ 2944 2944 SHCLX11CTX X11Ctx; … … 2951 2951 AssertRCReturn(rc, 1); 2952 2952 2953 /* ** UTF-8 from X11 ***/2953 /* UTF-8 from X11 */ 2954 2954 RTTestSub(hTest, "reading UTF-8 from X11"); 2955 2955 /* Simple test */ … … 2983 2983 tstStringFromX11(hTest, &X11Ctx, "hello world", VINF_SUCCESS); 2984 2984 2985 /* ** Latin1 from X11 ***/2985 /* Latin1 from X11 */ 2986 2986 RTTestSub(hTest, "reading Latin1 from X11"); 2987 2987 /* Simple test */ … … 3007 3007 tstLatin1FromX11(hTest, &X11Ctx, "Georges Dupr\xEA!", VINF_SUCCESS); 3008 3008 3009 /*** Unknown X11 format ***/ 3009 /* 3010 * Unknown X11 format 3011 */ 3010 3012 RTTestSub(hTest, "handling of an unknown X11 format"); 3011 3013 tstClipInvalidateFormats(); … … 3016 3018 (hTest, "Failed to send a format update notification\n")); 3017 3019 3018 /*** Timeout from X11 ***/ 3020 /* 3021 * Timeout from X11 3022 */ 3019 3023 RTTestSub(hTest, "X11 timeout"); 3020 3024 tstClipSetSelectionValues("UTF8_STRING", XT_CONVERT_FAIL, NULL,0, 8); 3021 3025 tstStringFromX11(hTest, &X11Ctx, "", VERR_NO_DATA); 3022 3026 3023 /*** No data in X11 clipboard ***/ 3027 /* 3028 * No data in X11 clipboard 3029 */ 3024 3030 RTTestSub(hTest, "a data request from an empty X11 clipboard"); 3025 3031 tstClipSetSelectionValues("UTF8_STRING", XA_STRING, NULL, … … 3034 3040 pReq, pReqRet)); 3035 3041 3036 /*** Ensure that VBox is notified when we return the CB to X11 ***/ 3042 /* 3043 * Ensure that VBox is notified when we return the CB to X11 3044 */ 3037 3045 RTTestSub(hTest, "notification of switch to X11 clipboard"); 3038 3046 tstClipInvalidateFormats(); … … 3041 3049 (hTest, "Failed to send a format update (release) notification\n")); 3042 3050 3043 /*** request for an invalid VBox format from X11 ***/ 3051 /* 3052 * Request for an invalid VBox format from X11 3053 */ 3044 3054 RTTestSub(hTest, "a request for an invalid VBox format from X11"); 3045 3055 /* Testing for 0xffff will go into handling VBOX_SHCL_FMT_UNICODETEXT, where we don't have … … 3054 3064 pReq, pReqRet)); 3055 3065 3056 /*** Targets failure from X11 ***/ 3066 /* 3067 * Targets failure from X11 3068 */ 3057 3069 RTTestSub(hTest, "X11 targets conversion failure"); 3058 3070 tstClipSetSelectionValues("UTF8_STRING", XA_STRING, "hello world", … … 3068 3080 tstClipQueryFormats())); 3069 3081 3070 /*** X11 text format conversion ***/ 3082 /* 3083 * X11 text format conversion 3084 */ 3071 3085 RTTestSub(hTest, "handling of X11 selection targets"); 3072 3086 RTTEST_CHECK_MSG(hTest, tstClipTextFormatConversion(&X11Ctx), 3073 3087 (hTest, "failed to select the right X11 text formats\n")); 3074 3088 3075 /*** UTF-8 from VBox ***/ 3089 /* 3090 * UTF-8 from VBox 3091 */ 3076 3092 RTTestSub(hTest, "reading UTF-8 from VBox"); 3077 3093 /* Simple test */ … … 3113 3129 "hello world"); 3114 3130 3115 /*** Timeout from VBox ***/ 3131 /* 3132 * Timeout from VBox 3133 */ 3116 3134 RTTestSub(hTest, "reading from VBox with timeout"); 3117 3135 tstClipEmptyVBox(&X11Ctx, VERR_TIMEOUT); 3118 3136 tstStringFromVBoxFailed(hTest, &X11Ctx, "UTF8_STRING"); 3119 3137 3120 /*** No data in VBox clipboard ***/ 3138 /* 3139 * No data in VBox clipboard 3140 */ 3121 3141 RTTestSub(hTest, "an empty VBox clipboard"); 3122 3142 tstClipSetSelectionValues("TEXT", XA_STRING, "", sizeof(""), 8); … … 3126 3146 tstStringFromVBoxFailed(hTest, &X11Ctx, "UTF8_STRING"); 3127 3147 3128 /*** An unknown VBox format ***/ 3148 /* 3149 * An unknown VBox format 3150 */ 3129 3151 RTTestSub(hTest, "reading an unknown VBox format"); 3130 3152 tstClipSetSelectionValues("TEXT", XA_STRING, "", sizeof(""), 8); … … 3135 3157 tstStringFromVBoxFailed(hTest, &X11Ctx, "UTF8_STRING"); 3136 3158 3137 /*** VBox requests a bad format ***/ 3159 /* 3160 * VBox requests a bad format 3161 */ 3138 3162 RTTestSub(hTest, "recovery from a bad format request"); 3139 3163 tstBadFormatRequestFromHost(hTest, &X11Ctx); … … 3143 3167 ShClX11Destroy(&X11Ctx); 3144 3168 3145 /*** Headless clipboard tests ***/ 3146 3169 /* 3170 * Headless clipboard tests 3171 */ 3147 3172 rc = ShClX11Init(&X11Ctx, NULL, true); 3148 3173 AssertRCReturn(rc, 1); 3149 3150 3174 rc = ShClX11ThreadStart(&X11Ctx, false /* fGrab */); 3151 3175 AssertRCReturn(rc, 1); 3152 3176 3153 /* ** Read from X11 ***/3177 /* Read from X11 */ 3154 3178 RTTestSub(hTest, "reading from X11, headless clipboard"); 3155 3179 /* Simple test */ … … 3160 3184 tstNoX11(&X11Ctx, "reading from X11, headless clipboard"); 3161 3185 3162 /* ** Read from VBox ***/3186 /* Read from VBox */ 3163 3187 RTTestSub(hTest, "reading from VBox, headless clipboard"); 3164 3188 /* Simple test */
Note:
See TracChangeset
for help on using the changeset viewer.