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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: Created 4 years, 4 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/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html
index d805373dd845251a182a5692de98c6e0fe1da046..ac41defbaac4ce2e22df5fd249522c919e099683 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.html
@@ -4,8 +4,10 @@
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/timeline-test.js"></script>
<script>
-function changeClassNameAndDisplay(callback)
+function changeClassNameAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
document.getElementById("testElementOne").className = "red";
document.getElementById("testElementTwo").className = "red";
@@ -13,10 +15,13 @@ function changeClassNameAndDisplay(callback)
if (window.testRunner)
testRunner.layoutAndPaintAsyncThen(callback);
});
+ return promise;
caseq 2016/08/05 17:56:43 replace with generateFrames()
kozy 2016/08/10 01:21:15 Done.
}
-function changeIdWithoutStyleChangeAndDisplay(callback)
+function changeIdWithoutStyleChangeAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
document.getElementById("testElementOne").id = "testElementNoMatchingStyles1";
document.getElementById("testElementTwo").id = "testElementNoMatchingStyles2";
@@ -24,10 +29,13 @@ function changeIdWithoutStyleChangeAndDisplay(callback)
if (window.testRunner)
testRunner.layoutAndPaintAsyncThen(callback);
});
+ return promise;
caseq 2016/08/05 17:56:43 ditto.
kozy 2016/08/10 01:21:15 Done.
}
-function changeIdAndDisplay(callback)
+function changeIdAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
document.getElementById("testElementNoMatchingStyles1").id = "testElementFour";
document.getElementById("testElementNoMatchingStyles2").id = "testElementFive";
@@ -35,10 +43,13 @@ function changeIdAndDisplay(callback)
if (window.testRunner)
testRunner.layoutAndPaintAsyncThen(callback);
});
+ return promise;
caseq 2016/08/05 17:56:43 ditto
kozy 2016/08/10 01:21:15 Done.
}
-function changeStyleAttributeAndDisplay(callback)
+function changeStyleAttributeAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
document.getElementById("testElementFour").setAttribute("style", "color: purple");
document.getElementById("testElementFive").setAttribute("style", "color: pink");
@@ -46,10 +57,13 @@ function changeStyleAttributeAndDisplay(callback)
if (window.testRunner)
testRunner.layoutAndPaintAsyncThen(callback);
});
+ return promise;
caseq 2016/08/05 17:56:43 ditto.
kozy 2016/08/10 01:21:15 Done.
}
-function changeAttributeAndDisplay(callback)
+function changeAttributeAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
document.getElementById("testElementFour").setAttribute("dir", "rtl");
document.getElementById("testElementFive").setAttribute("dir", "rtl");
@@ -57,10 +71,13 @@ function changeAttributeAndDisplay(callback)
if (window.testRunner)
testRunner.layoutAndPaintAsyncThen(callback);
});
+ return promise;
caseq 2016/08/05 17:56:43 ditto.
kozy 2016/08/10 01:21:15 Done.
}
-function changePseudoAndDisplay(callback)
+function changePseudoAndDisplay()
{
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
requestAnimationFrame(function() {
var element1 = document.getElementById("testElementFour");
var element2 = document.getElementById("testElementFive");
@@ -71,6 +88,7 @@ function changePseudoAndDisplay(callback)
testRunner.layoutAndPaintAsyncThen(callback);
});
});
+ return promise;
caseq 2016/08/05 17:56:43 ditto.
kozy 2016/08/10 01:21:15 Done.
}
function test()

Powered by Google App Engine
This is Rietveld 408576698