| Index: third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html b/third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..99cb46a1d3eba83fc3c35a40d26a1b4269a61a69
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html
|
| @@ -0,0 +1,79 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/console-test.js"></script>
|
| +<script>
|
| +
|
| +function logToConsole()
|
| +{
|
| + var obj = {a: 1, b: "foo", c: null};
|
| + console.log(obj);
|
| +}
|
| +
|
| +var test = function()
|
| +{
|
| + InspectorTest.evaluateInConsole("logToConsole()", step1);
|
| +
|
| + function step1()
|
| + {
|
| + InspectorTest.expandConsoleMessages(step2);
|
| + }
|
| +
|
| + function step2()
|
| + {
|
| + var valueElements = getValueElements();
|
| + doubleClickTypeAndEnter(valueElements[0], "1 + 2");
|
| + InspectorTest.waitForRemoteObjectsConsoleMessages(step3);
|
| + }
|
| +
|
| + function step3()
|
| + {
|
| + var valueElements = getValueElements();
|
| + doubleClickTypeAndEnter(valueElements[1], "nonExistingValue");
|
| + InspectorTest.waitForRemoteObjectsConsoleMessages(step4);
|
| + }
|
| +
|
| + function step4()
|
| + {
|
| + var valueElements = getValueElements();
|
| + doubleClickTypeAndEnter(valueElements[2], "[1, 2, 3]");
|
| + InspectorTest.waitForRemoteObjectsConsoleMessages(step5);
|
| + }
|
| +
|
| + function step5()
|
| + {
|
| + InspectorTest.dumpConsoleMessages(false, false, InspectorTest.dumpConsoleMessagesWithObjectProperties);
|
| + InspectorTest.completeTest();
|
| + }
|
| +
|
| + function getValueElements()
|
| + {
|
| + var messageElement = WebInspector.ConsoleView.instance()._visibleViewMessages[1]._messageElement;
|
| + return messageElement.querySelectorAll("::shadow .value");
|
| + }
|
| +
|
| + function doubleClickTypeAndEnter(node, text)
|
| + {
|
| + var event = document.createEvent("MouseEvent");
|
| + event.initMouseEvent("dblclick", true, true, null, 2);
|
| + node.dispatchEvent(event);
|
| +
|
| + InspectorTest.addResult("Node was hidden after dblclick: " + node.classList.contains("hidden"));
|
| +
|
| + var messageElement = WebInspector.ConsoleView.instance()._visibleViewMessages[1]._messageElement;
|
| + var editPrompt = messageElement.querySelector("::shadow .text-prompt");
|
| + editPrompt.textContent = text;
|
| + editPrompt.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests that property values can be edited inline in the console via double click.
|
| +</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|