Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/scripting/event-loops/task_microtask_ordering.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/scripting/event-loops/task_microtask_ordering.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/scripting/event-loops/task_microtask_ordering.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/scripting/event-loops/task_microtask_ordering.html
deleted file mode 100644
index ccfe32e95c9e40c39d8f8508694dcf7253387e51..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/webappapis/scripting/event-loops/task_microtask_ordering.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<title>Task and Microtask Ordering </title>
-<link rel=author title="Joshua Bell" href="mailto:jsbell@google.com">
-<link rel=help href="https://html.spec.whatwg.org/multipage/#event-loops">
-<script src="../../../../../../resources/testharness.js"></script>
-<script src="../../../../../../resources/testharnessreport.js"></script>
-<script src="resources/common.js"></script>
-
-<div class="outer">
- <div class="inner"></div>
-</div>
-
-<script>
-
-// Based on: https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/
-
-log_test(function(t, log) {
- log('script start');
-
- setTimeout(function() {
- log('setTimeout');
- }, 0);
-
- Promise.resolve().then(function() {
- log('promise1');
- }).then(function() {
- log('promise2');
- });
-
- log('script end');
-}, [
- 'script start',
- 'script end',
- 'promise1',
- 'promise2',
- 'setTimeout'
-], 'Basic task and microtask ordering');
-
-log_test(function(t, log) {
- // Let's get hold of those elements
- var outer = document.querySelector('.outer');
- var inner = document.querySelector('.inner');
-
- // Let's listen for attribute changes on the
- // outer element
- new MutationObserver(function() {
- log('mutate');
- }).observe(outer, {
- attributes: true
- });
-
- // Here's a click listener...
- function onClick() {
- log('click');
-
- setTimeout(function() {
- log('timeout');
- }, 0);
-
- Promise.resolve().then(function() {
- log('promise');
- });
-
- outer.setAttribute('data-random', Math.random());
- }
-
- // ...which we'll attach to both elements
- inner.addEventListener('click', onClick);
- outer.addEventListener('click', onClick);
-
- // Note that this will behave differently than a real click,
- // since the dispatch is synchronous and microtasks will not
- // run between event bubbling steps.
- inner.click();
-}, [
- 'click',
- 'click',
- 'promise',
- 'mutate',
- 'promise',
- 'timeout',
- 'timeout'
-], 'Level 1 bossfight (synthetic click)');
-
-</script>

Powered by Google App Engine
This is Rietveld 408576698