Title: [206063] trunk/LayoutTests
- Revision
- 206063
- Author
- joep...@webkit.org
- Date
- 2016-09-16 20:53:29 -0700 (Fri, 16 Sep 2016)
Log Message
Unreviewed cleanup of some inspector tests.
* TestExpectations:
Start skipping some debugger stepping test flakeyness on
Debug builds until that bug is addressed.
* inspector/debugger/break-on-exception-throw-in-promise.html:
Remove debug only.
* inspector/debugger/paused-scopes.html: Added.
This test was missing for 3 months. Its expectations got added
but the test itself got lost after a rollout and re-land.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (206062 => 206063)
--- trunk/LayoutTests/ChangeLog 2016-09-17 03:18:45 UTC (rev 206062)
+++ trunk/LayoutTests/ChangeLog 2016-09-17 03:53:29 UTC (rev 206063)
@@ -1,3 +1,18 @@
+2016-09-16 Joseph Pecoraro <pecor...@apple.com>
+
+ Unreviewed cleanup of some inspector tests.
+
+ * TestExpectations:
+ Start skipping some debugger stepping test flakeyness on
+ Debug builds until that bug is addressed.
+
+ * inspector/debugger/break-on-exception-throw-in-promise.html:
+ Remove debug only.
+
+ * inspector/debugger/paused-scopes.html: Added.
+ This test was missing for 3 months. Its expectations got added
+ but the test itself got lost after a rollout and re-land.
+
2016-09-16 Chris Dumez <cdu...@apple.com>
Cancelling one frame's load cancels load in other frames that have the same URL as well
Modified: trunk/LayoutTests/TestExpectations (206062 => 206063)
--- trunk/LayoutTests/TestExpectations 2016-09-17 03:18:45 UTC (rev 206062)
+++ trunk/LayoutTests/TestExpectations 2016-09-17 03:53:29 UTC (rev 206063)
@@ -144,6 +144,9 @@
# This test is fast enough in release but quite slow in debug builds.
[ Debug ] inspector/debugger/debugger-stack-overflow.html [ Skip ]
+# Debugger stepping tests can timeout if they run slowly due to a short timer scheduled in the frontend.
+webkit.org/b/161951 [ Debug ] inspector/debugger/paused-scopes.html [ Skip ]
+
# Doesn't work yet, relies on network replay functionality (webkit.org/b/130728, webkit.org/b/129391)
webkit.org/b/131318 http/tests/inspector/replay/document-last-modified-fallback-value.html [ Skip ]
Modified: trunk/LayoutTests/inspector/debugger/break-on-exception-throw-in-promise.html (206062 => 206063)
--- trunk/LayoutTests/inspector/debugger/break-on-exception-throw-in-promise.html 2016-09-17 03:18:45 UTC (rev 206062)
+++ trunk/LayoutTests/inspector/debugger/break-on-exception-throw-in-promise.html 2016-09-17 03:53:29 UTC (rev 206063)
@@ -12,8 +12,6 @@
let suite = InspectorTest.createAsyncSuite("BreakOnAnyException.Promise");
- InspectorTest.debug();
-
function addTestCase({name, description, _expression_}) {
suite.addTestCase({
name, description,
Added: trunk/LayoutTests/inspector/debugger/paused-scopes.html (0 => 206063)
--- trunk/LayoutTests/inspector/debugger/paused-scopes.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/paused-scopes.html 2016-09-17 03:53:29 UTC (rev 206063)
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+function test()
+{
+ function scopeTypeName(type) {
+ switch (type) {
+ case WebInspector.ScopeChainNode.Type.Local: return "Local";
+ case WebInspector.ScopeChainNode.Type.Global: return "Global";
+ case WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment: return "GlobalLexicalEnvironment";
+ case WebInspector.ScopeChainNode.Type.With: return "With";
+ case WebInspector.ScopeChainNode.Type.Closure: return "Closure";
+ case WebInspector.ScopeChainNode.Type.Catch: return "Catch";
+ case WebInspector.ScopeChainNode.Type.FunctionName: return "FunctionName";
+ case WebInspector.ScopeChainNode.Type.Block: return "Block";
+ default: return "Unknown!";
+ };
+ }
+
+ function sanitizeHash(hash) {
+ return hash.replace(/:(.*?):/, ":<sourceID>:");
+ }
+
+ function collectScopeChainProperties(scopeChain) {
+ let scopeChainData = [];
+
+ let promises = [];
+ for (let scope of scopeChain) {
+ let data = "" properties: []};
+ scopeChainData.push(data);
+ if (scope.type === WebInspector.ScopeChainNode.Type.Global)
+ continue;
+
+ for (let scopeObject of scope.objects) {
+ promises.push(new Promise((resolve, reject) => {
+ scopeObject.getAllPropertyDescriptors((propertyDescriptors) => {
+ data.properties = data.properties.concat(propertyDescriptors);
+ resolve();
+ });
+ }));
+ }
+ }
+
+ return Promise.all(promises)
+ .then(() => scopeChainData);
+ }
+
+ function dumpScopeChainData(scopeChainData) {
+ for (let {scope, properties} of scopeChainData) {
+ InspectorTest.log(` SCOPE: Name (${scope.name}) - Type (${scopeTypeName(scope.type)}) - Hash (${sanitizeHash(scope.hash)})`);
+ for (let propertyDescriptor of properties)
+ InspectorTest.log(` - ${propertyDescriptor.name}`);
+ }
+ }
+
+ function dumpCallFrame(callFrame) {
+ return Promise.all([
+ collectScopeChainProperties(callFrame.scopeChain),
+ collectScopeChainProperties(callFrame.mergedScopeChain()),
+ ]).then((results) => {
+ let [scopeChainData, mergedScopeChainData] = results;
+ InspectorTest.log(`CALLFRAME: ${callFrame.functionName}`);
+ InspectorTest.log("\n---- Scope Chain ----");
+ dumpScopeChainData(scopeChainData);
+ InspectorTest.log("\n---- Merged Scope Chain ----");
+ dumpScopeChainData(mergedScopeChainData);
+ InspectorTest.log("");
+ });
+ }
+
+ function dumpCallFrames() {
+ let callFrames = WebInspector.debuggerManager.callFrames;
+ let chain = Promise.resolve();
+ for (let callFrame of callFrames)
+ chain = chain.then(() => dumpCallFrame(callFrame));
+ return chain;
+ }
+
+
+ let suite = InspectorTest.createAsyncSuite("PausedCallFrameScope");
+
+ suite.addTestCase({
+ name: "TriggerFirstPause",
+ description: "Verify CallFrames and Scopes with the first pause.",
+ test: (resolve, reject) => {
+ InspectorTest.evaluateInPage("setTimeout(entry)");
+ WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) => {
+ dumpCallFrames().then(resolve, reject);
+ });
+ }
+ });
+
+ suite.addTestCase({
+ name: "TriggerSecondPause",
+ description: "Verify CallFrames and Scopes with the first pause.",
+ test: (resolve, reject) => {
+ WebInspector.debuggerManager.resume();
+ WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.CallFramesDidChange, (event) => {
+ dumpCallFrames().then(() => {
+ WebInspector.debuggerManager.resume();
+ resolve();
+ }, reject);
+ });
+ }
+ });
+
+ suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>Check scope chains for different call frames at different pauses.</p>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes