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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a 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-with-invalidations.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html
index 3cac78a40a74be4db2c8502b519c85cdae99ee9a..0123f070a1800f416d161eaed78ce6c6f39243ab 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html
@@ -4,48 +4,38 @@
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/timeline-test.js"></script>
<script>
-function changeStylesAndDisplay(callback)
+function changeStylesAndDisplay()
{
- requestAnimationFrame(function() {
- document.getElementById("testElementOne").style.color = "red";
- document.getElementById("testElementTwo").style.color = "blue";
- var forceLayout = document.body.offsetTop;
- if (window.testRunner)
- testRunner.layoutAndPaintAsyncThen(callback);
- });
+ document.getElementById("testElementOne").style.color = "red";
+ document.getElementById("testElementTwo").style.color = "blue";
+ var forceLayout = document.body.offsetTop;
+ return waitForFrame();
}
-function changeMultipleStylesAndDisplay(callback)
+function changeMultipleStylesAndDisplay()
{
- requestAnimationFrame(function() {
- var elementOne = document.getElementById("testElementOne");
- var elementTwo = document.getElementById("testElementTwo");
- var elementThree = document.getElementById("testElementThree");
+ var elementOne = document.getElementById("testElementOne");
+ var elementTwo = document.getElementById("testElementTwo");
+ var elementThree = document.getElementById("testElementThree");
- elementOne.style.backgroundColor = "orangered";
- var forceStyleRecalc1 = document.body.offsetTop;
- elementOne.style.color = "mediumvioletred";
- elementTwo.style.color = "deepskyblue";
- var forceStyleRecalc2 = document.body.offsetTop;
- elementOne.style.color = "tomato";
- elementTwo.style.color = "mediumslateblue";
- elementThree.style.color = "mediumspringgreen";
- var forceStyleRecalc3 = document.body.offsetTop;
-
- if (window.testRunner)
- testRunner.layoutAndPaintAsyncThen(callback);
- });
+ elementOne.style.backgroundColor = "orangered";
+ var forceStyleRecalc1 = document.body.offsetTop;
+ elementOne.style.color = "mediumvioletred";
+ elementTwo.style.color = "deepskyblue";
+ var forceStyleRecalc2 = document.body.offsetTop;
+ elementOne.style.color = "tomato";
+ elementTwo.style.color = "mediumslateblue";
+ elementThree.style.color = "mediumspringgreen";
+ var forceStyleRecalc3 = document.body.offsetTop;
+ return waitForFrame();
}
-function changeSubframeStylesAndDisplay(callback)
+function changeSubframeStylesAndDisplay()
{
- requestAnimationFrame(function() {
- frames[0].document.body.style.backgroundColor = "papayawhip";
- frames[0].document.body.children[0].style.width = "200px";
- var forceLayout = frames[0].document.body.offsetTop;
- if (window.testRunner)
- testRunner.layoutAndPaintAsyncThen(callback);
- });
+ frames[0].document.body.style.backgroundColor = "papayawhip";
+ frames[0].document.body.children[0].style.width = "200px";
+ var forceLayout = frames[0].document.body.offsetTop;
+ return waitForFrame();
}
function test()

Powered by Google App Engine
This is Rietveld 408576698