Add Event::IsErrorEvent()

This CL adds blink::Event::IsErrorEvent() and also defines the type cast
ToErrorEvent() as blink::BeforeUnloadEvent does.
These will be used in following CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1215512

Bug: 872138
Change-Id: Iaa2f6a1eb54dc8f4baecaeac44dc4cf48c6d8f04
Reviewed-on: https://chromium-review.googlesource.com/1250502
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Yuki Yamada <yukiy@google.com>
Cr-Commit-Position: refs/heads/master@{#595006}
4 files changed