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

Unified Diff: LayoutTests/inspector/timeline/tracing/decode-resize.html

Issue 477153005: DevTools: adopt existing Timeline tests for tracing based Timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: LayoutTests/inspector/timeline/tracing/decode-resize.html
diff --git a/LayoutTests/inspector/timeline/tracing/decode-resize.html b/LayoutTests/inspector/timeline/tracing/decode-resize.html
deleted file mode 100644
index 10414e129691da2d2ddfd09c43a58c409e9ff137..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/timeline/tracing/decode-resize.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<html>
-<head>
-<style>
-div#img-container {
- position: relative;
- width: 99px;
- height: 99px;
- overflow: clip;
-}
-</style>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/timeline-test.js"></script>
-<script src="../../tracing-test.js"></script>
-<script>
-
-var images = [
- ["../resources/test.bmp", "25", "25"],
- ["../resources/test.gif", "25", "25"],
- ["../resources/test.ico", "25", "25"],
- ["../resources/test.jpg", "25", "25"],
- ["../resources/test.png", "25", "25"],
- ["../resources/test.webp", "25", "25"],
- ["../resources/big.png", "150", "150"]
-];
-
-function showImages(callback)
-{
- var nextImageIndex = 0;
- var imgElement = document.getElementById("img-container").firstElementChild;
-
- imgElement.addEventListener("load", imageLoaded);
- addImages();
-
- function addImages()
- {
- if (nextImageIndex >= images.length) {
- imgElement.removeEventListener("load", imageLoaded);
- callback();
- return;
- }
-
- var image = images[nextImageIndex++];
-
- imgElement.width = image[1];
- imgElement.height = image[2];
- imgElement.src = image[0];
- }
-
- function imageLoaded()
- {
- testRunner.displayAsyncThen(addImages);
- }
-}
-
-
-function test()
-{
- var imageCount = 0;
-
- InspectorTest.invokeWithTracing("showImages", onTracingComplete);
- function onTracingComplete()
- {
- var events = InspectorTest.tracingTimelineModel.inspectedTargetEvents();
- for (var i = 0; i < events.length; ++i) {
- var event = events[i];
- if (events[i].name !== WebInspector.TracingTimelineModel.RecordType.DecodeImage)
- continue;
- InspectorTest.addResult("event: " + event.name);
- InspectorTest.addResult("imageURL: " + InspectorTest.formatters.formatAsURL(event.imageURL));
- InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0 ? "present" : "absent"));
- }
- InspectorTest.completeTest();
- }
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests the instrumentation of a DecodeImage and ResizeImage events
-</p>
-<div id="img-container"><img></div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698