Revision 260166c7aa434d6367910af87f67fdaf51146068 authored by Lukasz Anforowicz on 02 April 2018, 20:04:17 UTC, committed by Chromium WPT Sync on 02 April 2018, 20:04:17 UTC
Bug: 809261
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Idafb2b4cc5da3d6c7a054e479745288cc3b86513
Reviewed-on: https://chromium-review.googlesource.com/984338
Commit-Queue: Ɓukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Nick Carter <nick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547494}
1 parent af485dc
Raw File
WorkerGlobalScope_ErrorEvent_filename.htm
<!DOCTYPE html>
<title> WorkerGlobalScope onerror event handler argument: location </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
// The worker events races with the window's load event; if the worker events
// arrive first, the harness will detect the error event and fail the test.
setup({ allow_uncaught_exception: true });

async_test(function(t) {
  var worker = new Worker('./support/ErrorEvent.js');
  worker.onmessage = t.step_func_done(function(e) {
    var href = location.href;
    var expected = href.substring(0, href.lastIndexOf('/')) + '/support/ErrorEvent.js';
    assert_equals(e.data.filename, expected);
  });
  worker.postMessage("Error Message");
});
</script>
back to top