With assumptions that the violation of the distance-duality relation entirely arises from non-conservation of the photon number and the absorption is frequency independent in the observed frequency range , we perform cosmological-model-independent tests for the cosmic opacity . The observational data include the largest Union2.1 type Ia supernova sample , which is taken for observed D _ { \mathrm { L } } , and galaxy cluster samples compiled by De Filippis et al . and Bonamente et al . , which are responsible for providing observed D _ { \mathrm { A } } . Two parameterizations , \tau ( z ) = 2 \epsilon z and \tau ( z ) = ( 1 + z ) ^ { 2 \epsilon } -1 are adopted for the optical depth associated to the cosmic absorption . We find that , an almost transparent universe is favored by Filippis et al . sample but it is only marginally accommodated by Bonomente et al . samples at 95.4 % confidence level ( C. L. ) ( even at 99.7 % C. L. when the r < 100 ~ { } \mathrm { kpc } -cut spherical \beta model is considered ) . Taking the possible cosmic absorption ( in 68.3 % C. L. range ) constrained from the model-independent tests into consideration , we correct the distance modulus of SNe Ia and then use them to study their cosmological implications . The constraints on the \Lambda CDM show that a decelerating expanding universe with \Omega _ { \Lambda } = 0 is only allowed at 99.7 % C. L. by observations when the Bonamente et al . sample is considered . Therefore , our analysis suggests that an accelerated cosmic expansion is still needed to account for the dimming of SNe and the standard cosmological scenario remains being supported by current observations .