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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: Protocol -> dp Created 3 years, 6 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-protocol/timeline/timeline-dispatchEvent.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html
deleted file mode 100644
index d43cdd13eafb5e36246cad33a97b358885bdfe03..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-dispatchEvent.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script>
-<script>
-
-function performAction()
-{
- var div = document.querySelector("#my-div");
- div.addEventListener("click", function(e) { }, false);
- div.click();
-
- var iframe = document.createElement("iframe");
- div.appendChild(iframe);
- return new Promise(resolve => {
- iframe.onload = resolve;
- iframe.src = "../resources/blank.html";
- });
-}
-
-function test()
-{
- InspectorTest.invokeAsyncWithTracing("performAction", finish);
-
- function finish(devtoolsEvents)
- {
- function windowEventFilter(type, e)
- {
- return e.name === "EventDispatch" && e.args.data.type === type;
- };
-
- var windowEventNames = [ "click", "beforeunload", "unload", "load" ];
- for (var i = 0; i < windowEventNames.length; i++) {
- var eventName = windowEventNames[i];
- var events = devtoolsEvents.filter(windowEventFilter.bind(this, eventName));
- if (events.length >= 1) {
- InspectorTest.log("SUCCESS: found " + eventName + " event");
- } else {
- fail(eventName + " event is missing", devtoolsEvents);
- }
- }
-
- InspectorTest.completeTest();
- }
-
- function fail(message, devtoolsEvents)
- {
- var formattedEvents = devtoolsEvents.map(function(e)
- {
- return e.name + (e.args.data ? "(" + e.args.data.type + ")" : "");
- });
- InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + JSON.stringify(formattedEvents, null, 2));
- }
-}
-</script>
-</head>
-<body onLoad="runTest();">
-<div id="my-div"></div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698