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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-event-causes.html

Issue 2145873002: [DevTools] Split inspector/tracing into subdirectories to speed things up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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-event-causes.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-event-causes.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-event-causes.html
deleted file mode 100644
index 129820f7ead0c904c46d53cbaffa057f47c86d06..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-event-causes.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<html>
-<head>
-<script src="../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../http/tests/inspector/timeline-test.js"></script>
-<script>
-function test()
-{
- function checkStringContains(string, contains)
- {
- var doesContain = string.indexOf(contains) >= 0;
- InspectorTest.check(doesContain, contains + " should be present in " + string);
- InspectorTest.addResult("PASS - record contained " + contains);
- }
-
- InspectorTest.runTestSuite([
- function testTimerInstall(next)
- {
- function setTimeoutFunction(callback)
- {
- setTimeout(callback, 0);
- }
-
- var source = setTimeoutFunction.toString();
- source += "\n//# sourceURL=setTimeoutFunction.js";
- InspectorTest.evaluateInPage(source);
-
- InspectorTest.invokeAsyncWithTimeline("setTimeoutFunction", finishAndRunNextTest);
- function finishAndRunNextTest()
- {
- var linkifier = new WebInspector.Linkifier();
- var record = InspectorTest.findFirstTimelineRecord("TimerFire");
- InspectorTest.check(record, "Should receive a TimerFire record.");
- var contentHelper = new WebInspector.TimelineDetailsContentHelper(InspectorTest.timelineModel().target(), linkifier, true);
- WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), InspectorTest.timelineModel().target(), null, contentHelper);
- var causes = contentHelper.element.deepTextContent();
- InspectorTest.check(causes, "Should generate causes");
- checkStringContains(causes, "Timer InstalledsetTimeoutFunction @ setTimeoutFunction.js:");
- next();
- }
- },
-
- function testRequestAnimationFrame(next)
- {
- function requestAnimationFrameFunction(callback)
- {
- requestAnimationFrame(callback);
- }
-
- var source = requestAnimationFrameFunction.toString();
- source += "\n//# sourceURL=requestAnimationFrameFunction.js";
- InspectorTest.evaluateInPage(source);
-
- InspectorTest.invokeAsyncWithTimeline("requestAnimationFrameFunction", finishAndRunNextTest);
- function finishAndRunNextTest()
- {
- var linkifier = new WebInspector.Linkifier();
- var record = InspectorTest.findFirstTimelineRecord("FireAnimationFrame");
- InspectorTest.check(record, "Should receive a FireAnimationFrame record.");
- var contentHelper = new WebInspector.TimelineDetailsContentHelper(InspectorTest.timelineModel().target(), linkifier, true);
- WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), InspectorTest.timelineModel().target(), null, contentHelper);
- var causes = contentHelper.element.deepTextContent();
- InspectorTest.check(causes, "Should generate causes");
- checkStringContains(causes, "Animation Frame RequestedrequestAnimationFrameFunction @ requestAnimationFrameFunction.js:");
- next();
- }
- },
-
- function testStyleRecalc(next)
- {
- function styleRecalcFunction()
- {
- var element = document.getElementById("testElement");
- element.style.backgroundColor = "papayawhip";
- var forceLayout = element.offsetWidth;
- }
-
- var source = styleRecalcFunction.toString();
- source += "\n//# sourceURL=styleRecalcFunction.js";
- InspectorTest.evaluateInPage(source);
-
- InspectorTest.evaluateWithTimeline("styleRecalcFunction()", finishAndRunNextTest);
- function finishAndRunNextTest()
- {
- var linkifier = new WebInspector.Linkifier();
- var record = InspectorTest.findFirstTimelineRecord("UpdateLayoutTree");
- InspectorTest.check(record, "Should receive a UpdateLayoutTree record.");
- var contentHelper = new WebInspector.TimelineDetailsContentHelper(InspectorTest.timelineModel().target(), linkifier, true);
- WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), InspectorTest.timelineModel().target(), null, contentHelper);
- var causes = contentHelper.element.deepTextContent();
- InspectorTest.check(causes, "Should generate causes");
- checkStringContains(causes, "First InvalidatedstyleRecalcFunction @ styleRecalcFunction.js:");
- next();
- }
- },
-
- function testLayout(next)
- {
- function layoutFunction()
- {
- var element = document.getElementById("testElement");
- element.style.width = "200px";
- var forceLayout = element.offsetWidth;
- }
-
- var source = layoutFunction.toString();
- source += "\n//# sourceURL=layoutFunction.js";
- InspectorTest.evaluateInPage(source);
-
- InspectorTest.evaluateWithTimeline("layoutFunction()", finishAndRunNextTest);
- function finishAndRunNextTest()
- {
- var linkifier = new WebInspector.Linkifier();
- var record = InspectorTest.findFirstTimelineRecord("Layout");
- InspectorTest.check(record, "Should receive a Layout record.");
- var contentHelper = new WebInspector.TimelineDetailsContentHelper(InspectorTest.timelineModel().target(), linkifier, true);
- WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), InspectorTest.timelineModel().target(), null, contentHelper);
- var causes = contentHelper.element.deepTextContent();
- InspectorTest.check(causes, "Should generate causes");
- checkStringContains(causes, "Layout ForcedlayoutFunction @ layoutFunction.js:");
- checkStringContains(causes, "First Layout InvalidationlayoutFunction @ layoutFunction.js:");
- next();
- }
- }
- ]);
-}
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Test that causes are correctly generated for various types of events.
-</p>
-<div id="testElement"></div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698