Hi davychen!
Your test code is fully functional for me aswell. The problem seems to occur when using sampler2DShadow as the first parameter. Here's a little snippet from my code:
uniform sampler2DShadow ShadowDepthTex;
...
vec4 shadowCoord = BiasMatrix * ShadowViewProj * worldPos;
float sum = 0;
// Sum contributions from texels around ShadowCoord
sum += textureProjOffset(ShadowDepthTex, shadowCoord, ivec2(-1,-1));
sum += textureProjOffset(ShadowDepthTex, shadowCoord, ivec2(-1,1));
sum += textureProjOffset(ShadowDepthTex, shadowCoord, ivec2(1,1));
sum += textureProjOffset(ShadowDepthTex, shadowCoord, ivec2(1,-1));
Regards,
Marcus