Note the difference: A cocoon is a covering of a pupa, and a chrysalis is a particular kind of pupa, usually with no enclosing cocoon.
Inside a cocoon, you will often find a pupa of a moth or other insect with an inner chitinous shell, but it is not called a chrysalis unless it is the pupa of a butterfly. The pupae of some insects have visible external body structures, such as wings and legs, as they develop, while others (such as moths) have a smooth outer shell that encloses the developing structures.
See http://en.wikipedia.org/wiki/Pupa