| Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fedbb4d600c76ff27cc69e171ad3c3b6cbde7d7d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script.html
|
| @@ -0,0 +1,33 @@
|
| +<html>
|
| +<head>
|
| +<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
|
| +<script>
|
| +
|
| +function testFunction()
|
| +{
|
| + var sync = true;
|
| + Promise.resolve().then(() => {
|
| + console.log(sync);
|
| + });
|
| + var doc = new DOMParser().parseFromString('hi', 'text/html');
|
| + sync = false;
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.sendCommandOrDie("Console.enable", {});
|
| + InspectorTest.eventHandler["Console.messageAdded"] = messageAdded;
|
| + InspectorTest.sendCommandOrDie("Runtime.evaluate", { "expression": "testFunction()" });
|
| +
|
| + function messageAdded(result)
|
| + {
|
| + InspectorTest.logObject(result.params.message.parameters[0]);
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +</script>
|
| +</head>
|
| +<body onLoad="runTest();">
|
| +Check that DOMParser().parseFromString() doesn't produce PerformMicrotasks call if JS is executing.
|
| +</body>
|
| +</html>
|
|
|