Bug 1529818 [wpt PR 15492] - LongTasks: fix sibling layout test, a=testonly
☠☠ backed out by 66b1aba3fb43 ☠ ☠
authorNicolás Peña Moreno <npm@chromium.org>
Wed, 06 Mar 2019 12:34:08 +0000
changeset 522265 ee028b57d61360d222f87731cd8e66733b2dcf5d
parent 522264 33633cf10c0d0a0c7cb416d34352e649878f1a8c
child 522266 6caf4fe5691dab0ede6322408e1c878493626088
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1529818, 15492, 927866, 1480114, 634243
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529818 [wpt PR 15492] - LongTasks: fix sibling layout test, a=testonly Automatic update from web-platform-tests LongTasks: fix sibling layout test This CL allows the main frame to produce a long task that is observed by the child frame. Such a long task can be detected because the attribution will be same-origin-ancestor. Bug: 927866 Change-Id: I38849b5f44172cbffd25f3ab429b0c1a96b0f1e3 Reviewed-on: https://chromium-review.googlesource.com/c/1480114 Reviewed-by: Timothy Dresser <tdresser@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#634243} -- wpt-commits: 493fdc7e7908360273baa0ee13421fff692cf8ed wpt-pr: 15492
testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
--- a/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
+++ b/testing/web-platform/tests/longtask-timing/longtask-in-sibling-iframe.html
@@ -9,16 +9,20 @@
 <script>
   async_test(t => {
     if (typeof PerformanceLongTaskTiming === 'undefined') {
         assert_unreached("Longtasks are not supported.");
         t.done();
     }
     window.addEventListener('message', t.step_func(e => {
       assert_equals(e.data['entryType'], 'longtask');
+      // Ignore any long task that may be produced by the top-level frame.
+      if (e.data['frame-attribution'] === 'same-origin-ancestor')
+        return;
+
       assert_equals(e.data['frame-attribution'], 'same-origin');
       assert_equals(e.data['task-attribution'], 'unknown');
       assert_equals(e.data['containerId'], 'longtask-iframe-id');
       assert_equals(e.data['containerName'], 'longtask-iframe-name');
       assert_equals(e.data['containerSrc'], 'resources/subframe-with-longtask.html');
       t.done();
     }));
     const observingFrame = document.createElement('iframe');