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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html

Issue 2968523003: [DevTools] Migrate inspector-protocol/debugger tests to new harness (Closed)
Patch Set: all tests 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/debugger/updateCallFrameScopes.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html
deleted file mode 100644
index 20004b438cf58e04728e8be3792b16c756973e00..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/updateCallFrameScopes.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script>
-<script>
-
-function TestFunction()
-{
- var a = 2;
- debugger;
- debugger;
-}
-
-function test()
-{
- var newVariableValue = 55;
-
- InspectorTest.sendCommand("Debugger.enable", {});
-
- InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused;
-
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(TestFunction, 0)" });
-
- function handleDebuggerPaused(messageObject)
- {
- InspectorTest.log("Paused on 'debugger;'");
- InspectorTest.eventHandler["Debugger.paused"] = undefined;
-
- var topFrame = messageObject.params.callFrames[0];
- var topFrameId = topFrame.callFrameId;
- InspectorTest.sendCommand("Debugger.evaluateOnCallFrame", { "callFrameId": topFrameId, "expression": "a = " + newVariableValue }, callbackChangeValue);
- }
-
- function callbackChangeValue(response)
- {
- InspectorTest.log("Variable value changed");
- InspectorTest.eventHandler["Debugger.paused"] = callbackGetBacktrace;
- InspectorTest.sendCommand("Debugger.resume", { });
- }
-
- function callbackGetBacktrace(response)
- {
- InspectorTest.log("Stacktrace re-read again");
- var localScope = response.params.callFrames[0].scopeChain[0];
- InspectorTest.sendCommand("Runtime.getProperties", { "objectId": localScope.object.objectId }, callbackGetProperties);
- }
-
- function callbackGetProperties(response)
- {
- InspectorTest.log("Scope variables downloaded anew");
- var varNamedA;
- var propertyList = response.result.result;
- for (var i = 0; i < propertyList.length; i++) {
- if (propertyList[i].name === "a") {
- varNamedA = propertyList[i];
- break;
- }
- }
- if (varNamedA) {
- var actualValue = varNamedA.value.value;
- InspectorTest.log("New variable is " + actualValue + ", expected is " + newVariableValue + ", old was: 2");
- InspectorTest.log(actualValue == newVariableValue ? "SUCCESS" : "FAIL");
- } else {
- InspectorTest.log("Failed to find variable in scope");
- }
- InspectorTest.completeTest();
- }
-}
-</script>
-</head>
-<body onLoad="runTest();">
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698