Dramatic irony is defined as when an audience watching a play understands what's going on in a situation while the characters are unaware of what is happening.
(noun)An example of dramatic irony is the last scene in Shakespeare's Romeo and Juliet, when Juliet commits suicide because she thinks Romeo has committed suicide.
See dramatic irony in American Heritage Dictionary 4