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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html

Issue 2961493002: [DevTools] Migrate inspector-protocol/{input,network} tests to new harness (Closed)
Patch Set: minor fixes 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/input/dispatchKeyEvent.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html b/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html
deleted file mode 100644
index 4ce88b3b022b8c45af01871112e3039f972933fb..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector-protocol/input/dispatchKeyEvent.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script>
-<script>
-
-window.addEventListener("keydown", logEvent);
-window.addEventListener("keypress", logEvent);
-window.addEventListener("keyup", logEvent);
-
-function logEvent(event)
-{
- log("-----Event-----");
- log("type: " + event.type);
- if (event.altKey)
- log("altKey");
- if (event.ctrlKey)
- log("ctrlKey");
- if (event.metaKey)
- log("metaKey");
- if (event.shiftKey)
- log("shiftKey");
- if (event.keyCode)
- log("keyCode: " + event.keyCode);
- if (event.key)
- log("key: " + event.key);
- if (event.charCode)
- log("charCode: " + event.charCode);
- if (event.text)
- log("text: " + event.text);
- log("");
-}
-
-function test()
-{
- var events = [
- {
- "type": "rawKeyDown",
- "windowsVirtualKeyCode": 65, // VK_A
- "key": "A"
- },
- {
- "type": "char",
- "modifiers": 8, // shift
- "text": "A",
- "unmodifiedText": "a"
- },
- {
- "type": "keyUp",
- "windowsVirtualKeyCode": 65,
- "key": "A"
- },
- {
- "type": "char",
- "text": "\u05E9", // Hebrew Shin (sh)
- "unmodifiedText": "\u05E9"
- }
- ];
-
- for (var i = 0; i < events.length; i++)
- InspectorTest.sendCommand("Input.dispatchKeyEvent", events[i], checkResponse.bind(undefined, i == events.length - 1));
-
- function checkResponse(isLastCommand, msg)
- {
- if (msg.error)
- InspectorTest.log("Error: " + msg.error.message);
- if (isLastCommand)
- InspectorTest.completeTest();
- }
-}
-
-</script>
-</head>
-<body onload="runTest()">
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698