[WPT] Fix instantiation-error-*.html

Around 2018, the spec was updated to have different
instantiation error objects for different root scripts,
but the tests were not updated accordingly.

Bug: 1234821
Change-Id: I3867ad087082fa2b4838ff32328d12da4c4c1272
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3064999
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#907752}
diff --git a/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html b/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html
index 8fa2b8b..32f0a4a 100644
--- a/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html
+++ b/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html
@@ -17,8 +17,14 @@
     });
 
     window.addEventListener("load", test_load.step_func_done(ev => {
-      const msg = log[0];
-      assert_array_equals(log, [msg, 1, msg, 2, msg, 3]);
+      assert_equals(log.length, 6, 'Log length');
+      assert_equals(log[1], 1);
+      assert_equals(log[3], 2);
+      assert_equals(log[5], 3);
+      assert_not_equals(log[0], log[2],
+        'Instantiation error objects for different root scripts');
+      assert_equals(log[0], log[4],
+        'Instantiation error objects for the same root script');
     }));
 
     function unreachable() { log.push("unexpected"); }
diff --git a/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html b/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html
index 238e883..8d3f238 100644
--- a/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html
+++ b/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html
@@ -17,8 +17,11 @@
     });
 
     window.addEventListener("load", test_load.step_func_done(ev => {
-      const msg = log[0];
-      assert_array_equals(log, [msg, 1, msg, 2]);
+      assert_equals(log.length, 4, 'Log length');
+      assert_equals(log[1], 1);
+      assert_equals(log[3], 2);
+      assert_not_equals(log[0], log[2],
+        'Instantiation error objects for different root scripts');
     }));
 
     function unreachable() { log.push("unexpected"); }
diff --git a/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html b/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html
index de2b6ba..20df0bb 100644
--- a/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html
+++ b/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html
@@ -17,8 +17,11 @@
     });
 
     window.addEventListener("load", test_load.step_func_done(ev => {
-      const msg = log[0];
-      assert_array_equals(log, [msg, 1, msg, 2]);
+      assert_equals(log.length, 4, 'Log length');
+      assert_equals(log[1], 1);
+      assert_equals(log[3], 2);
+      assert_not_equals(log[0], log[2],
+        'Instantiation error objects for different root scripts');
     }));
 
     function unreachable() { log.push("unexpected"); }