Bug 1529818 [wpt PR 15492] - LongTasks: fix sibling layout test, a=testonly
authorNicolás Peña Moreno <npm@chromium.org>
Wed, 06 Mar 2019 12:34:08 +0000
changeset 522544 cd9ac71c85c6abbea6f856c576a3c261c34e6fba
parent 522543 3df4d4a707f5ae145cf2249818b7ce1e3021e939
child 522545 496fc0a8cd1d53d2066ecf4ccadf557261dc935b
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');