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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html

Issue 2139043002: DevTools: show alternate title onexpand of object in console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reuse dump() in tests Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6
7 function logToConsole()
8 {
9 var obj = {a: 1, b: "foo", c: null};
10 console.log(obj);
11 }
12
13 var test = function()
14 {
15 InspectorTest.evaluateInConsole("logToConsole()", step1);
16
17 function step1()
18 {
19 InspectorTest.expandConsoleMessages(step2);
20 }
21
22 function step2()
23 {
24 var valueElements = getValueElements();
25 doubleClickTypeAndEnter(valueElements[0], "1 + 2");
26 InspectorTest.waitForRemoteObjectsConsoleMessages(step3);
27 }
28
29 function step3()
30 {
31 var valueElements = getValueElements();
32 doubleClickTypeAndEnter(valueElements[1], "nonExistingValue");
33 InspectorTest.waitForRemoteObjectsConsoleMessages(step4);
34 }
35
36 function step4()
37 {
38 var valueElements = getValueElements();
39 doubleClickTypeAndEnter(valueElements[2], "[1, 2, 3]");
40 InspectorTest.waitForRemoteObjectsConsoleMessages(step5);
41 }
42
43 function step5()
44 {
45 InspectorTest.dumpConsoleMessagesIgnoreErrorStackFrames();
46 InspectorTest.completeTest();
47 }
48
49 function getValueElements()
50 {
51 var messageElement = WebInspector.ConsoleView.instance()._visibleViewMes sages[1]._messageElement;
52 return messageElement.querySelectorAll("::shadow .value");
53 }
54
55 function doubleClickTypeAndEnter(node, text)
56 {
57 var event = document.createEvent("MouseEvent");
58 event.initMouseEvent("dblclick", true, true, null, 2);
59 node.dispatchEvent(event);
60
61 InspectorTest.addResult("Node was hidden after dblclick: " + node.classL ist.contains("hidden"));
62
63 var messageElement = WebInspector.ConsoleView.instance()._visibleViewMes sages[1]._messageElement;
64 var editPrompt = messageElement.querySelector("::shadow .text-prompt");
65 editPrompt.textContent = text;
66 editPrompt.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
67 }
68 }
69
70 </script>
71 </head>
72
73 <body onload="runTest()">
74 <p>
75 Tests that property values can be edited inline in the console via double click.
76 </p>
77
78 </body>
79 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698