Let $P\rightarrow M$ be a principal bundle, with structure group $G$. If $G$ has a representation $\rho:G\rightarrow GL(n,\mathbb{C})$, then we can define its associated vector bundle $E=P\times_{\rho}\mathbb{C}^{n}$.
Since a connection $A$ on $P$ induces a covariant differential $\nabla$ on $E$, I would say that the Chern classes defined on $P$ is the same to the Chern classes defined on $E$.
Is the above statement correct?
I got confused because one can define the so-called adjoint bundle $ad(P)=P\times_{Ad}\mathfrak{g}$, where $Ad$ represents the adjoint action of $G$ acting on its own Lie algebra $\mathfrak{g}$. Such a bundle has typical fiber $\mathfrak{g}$ being the Lie algebra of its own structure group.
Take the canonical line bundle over $\mathbb{CP}^{1}$ as an example. The total space of the principal bundle is $S^{3}$, which is non-trivial. However, starting from the principal bundle $S^{3}\rightarrow\mathbb{CP}^{1}$, the adjoint bundle seems to be $\mathbb{CP}^{1}\times\mathbb{R}$, which is trivial, because its structure group $U(1)$ is abelian and the first Stiefel-Whitney class is zero.
Now, both the trivial line bundle and the canonical line bundle are the associated vector bundle of the same hopf fibration, but the adjoint bundle doesn't even have a Chern class.
Is that really true that the Chern class $c_{i}(P)$ of a principal bundle is same to the Chern class $c_{i}(E)$ of its associated vector bundle $E$?
In general, under what situation will the Chern class of a principal $G$-bundle be same to the Chern class of any of associated complex vector bundle?