Aims. We investigate the long-term evolution of inclined test particles representing a small Earth-like body with negligible gravitational effects (hereafter called massless test-planets) in the restricted three-body problem, and consisting of a star, a gas giant, and a massless test-planet. The test-planet is initially on a circular orbit and moves around the star at distances closer than the gas giant. The aim is to show the influences of the eccentricity and the mass of the gas giant on the dynamics, for various inclinations of the test-planet, and to investigate in more detail the Kozai mechanism in the elliptic problem. Methods. We performed a parametric study, integrating the orbital evolution of test particles whose initial conditions were distributed on the semi-major axis-inclination plane. The gas giant's initial eccentricity was varied. For the calculations, we used the Lie integration method and in some cases the Bulirsch-Stoer algorithm. To analyze the results, the maximum eccentricity and the Lyapunov characteristic indicator were used. All integrations were performed for 105 periods of the gas giant. Results. Our calculations show that inclined massless test-planets can be in stable configurations with gas giants on either circular or elliptic orbits. The higher the eccentricity of the gas giant, the smaller the possible range in semi-major axis for the test-planet. For gas giants on circular orbits, our results illustrate the well-known results associated with the Kozai mechanism, which do not allow stable orbits above a critical inclination of approximately 40°. For gas giants on eccentric orbits, the dynamics is quite similar, and the massless companion exhibits limited variations in eccentricity. In addition, we identify a region around 35° consisting of long-time stable, low eccentric orbits. We show that these results are also valid for Earth-mass companions, therefore they can be applied to extrasolar systems: for instance, the extrasolar planetary system HD 154345 can possess a 35° degree inclined, nearly circular, Earth-mass companion in the habitable zone.