Revision 79f402f76e5b78f0fae93dbff7c4ddc5cd382e04 authored by Kent Tamura on 13 February 2018, 09:24:39 UTC, committed by Blink WPT Bot on 13 February 2018, 09:48:50 UTC
importNode() implementation should pass "is" value to "create an
element" algorithm.

WPT: Add a new test for importNode().

Bug: 807871
Change-Id: Id60c5577b5899aeac66b819986c34a28978e24d9
Reviewed-on: https://chromium-review.googlesource.com/915744
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536311}
1 parent 57780df
Raw File
MessageEvent_onmessage_postMessage_infinite_loop.html
<!DOCTYPE html>
<html>
<head>
<title>MessageEvent: onmessage infinite loop</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
'use strict';

// The test passes if the onmessage / postMessage loop does not prevent the
// step_timeout task from ever being run. In particular there should be no
// infinite loop or stack overflow.
async_test(function(t) {
  var channel = new MessageChannel();
  var count = 0;
  channel.port1.addEventListener("message", t.step_func(function() {
    count++;
    assert_less_than(count, 1000, "There were many message events without " +
                                  "t.step_timeout ever being called.");
  }));
  channel.port1.addEventListener("message", t.step_func(function() {
    channel.port2.postMessage(0);
  }));
  channel.port1.start();
  channel.port2.postMessage(0);

  t.step_timeout(function() { t.done(); }, 0);
}, "onmessage calling source postMessage");
</script>
back to top