Reduce usage of ModuleScript::IsErrored() and HasInstantiated() in tests

IsErrored() and HasInstantiated() are to be removed because they are
removed from the HTML spec in
https://github.com/whatwg/html/pull/2991.

This CL
- Replaces IsErrored() calls in unit tests with checks for Instantiate()
  results or with HasEmptyRecord(), depending on whether instantiation errors
  or parse errors are tested, and
- Removes EXPECT_FALSE(HasInstantiated()) from ModuleMapTest.cpp, because
  instantiation is already prohibited by NOTREACHED() in
  DummyModulator::InstantiateModule().

Bug: 763597
Change-Id: I272a03f3d5ce8ddf6ea645a3d0d1a1ae7543f2be
Reviewed-on: https://chromium-review.googlesource.com/703483
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506947}
3 files changed