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

Side by Side Diff: LayoutTests/inspector/sources/debugger/watch-expressions-panel-switch.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="../../../http/tests/inspector/network-test.js"></script>
6 <script src="../../../http/tests/inspector/debugger-test.js"></script>
7 <script>
8 function testFunction()
9 {
10 var x = Math.sqrt(10);
11 return x;
12 }
13
14 var test = function()
15 {
16 InspectorTest.setQuiet(true);
17 InspectorTest.startDebuggerTest(step1);
18
19 var currentSourceFrame;
20 var watchExpressionsPane;
21 //callback per each watchExpression called twice: in constructor and when ac tual evaluation result is available
22 var updateCount = 4;
23
24 function step1()
25 {
26 watchExpressionsPane = WebInspector.panels.sources.sidebarPanes.watchExp ressions;
27 watchExpressionsPane.expand();
28 watchExpressionsPane.addExpression("window.document");
29 watchExpressionsPane.addExpression("windowa.document");
30
31 var testName = InspectorTest.resourceTreeModel.inspectedPageURL();
32 testName = testName.substring(testName.lastIndexOf('/') + 1);
33 InspectorTest.showScriptSource(testName, didShowScriptSource);
34 }
35
36 function didShowScriptSource(sourceFrame)
37 {
38 currentSourceFrame = sourceFrame;
39 InspectorTest.addResult("Script source was shown.");
40 InspectorTest.setBreakpoint(currentSourceFrame, 9, "", true);
41 InspectorTest.addSniffer(WebInspector.WatchExpression.prototype, "_creat eWatchExpression", watchExpressionsUpdated, true);
42 // Switch to another panel to test how watch expressions evaluation toge ther with panel switching.
43 WebInspector.NetworkPanel.show();
44 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
45 }
46
47 function didPause(callFrames)
48 {
49 }
50
51 function watchExpressionsUpdated()
52 {
53 updateCount--;
54 if (updateCount)
55 return;
56
57 InspectorTest.addResult("Watch expressions updated.");
58
59 for (var i = 0; i < watchExpressionsPane._watchExpressions.length; i++) {
60 var watch = watchExpressionsPane._watchExpressions[i];
61 var nameElement = watch._objectPresentationElement.querySelector(".n ame");
62 var valueElement = watch._objectPresentationElement.querySelector(". value");
63 InspectorTest.addResult("'" + nameElement.textContent + "'" + " => " + "'" + valueElement.textContent + "'");
64 }
65
66 watchExpressionsPane._deleteAllButtonClicked();
67 InspectorTest.completeDebuggerTest();
68 }
69 }
70
71 </script>
72 </head>
73 <body onload="runTest()">
74 <p>Tests debugger does not fail when stopped while a panel other than scripts wa s opened. Both valid and invalid expressions are added to watch expressions.</p>
75 <a href="https://bugs.webkit.org/show_bug.cgi?id=70718">Bug 70718</a>
76 </body>
77 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698