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

Unified Diff: LayoutTests/inspector/debugger/debugger-change-variable.html

Issue 83383002: DevTools: Allow setting -0 value to object property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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: LayoutTests/inspector/debugger/debugger-change-variable.html
diff --git a/LayoutTests/inspector/debugger/debugger-change-variable.html b/LayoutTests/inspector/debugger/debugger-change-variable.html
index 949ec4223b261c63e9baaf95504f94fab52eebd9..b5eb7ee97f3bbb537dca72cbe6843d664aa99fb3 100644
--- a/LayoutTests/inspector/debugger/debugger-change-variable.html
+++ b/LayoutTests/inspector/debugger/debugger-change-variable.html
@@ -20,6 +20,19 @@ var test = function()
{
InspectorTest.startDebuggerTest(step1);
+ var localScope;
+
+ function doSetPropertyValue(name, value, evalInConsole, next)
+ {
+ localScope.setPropertyValue(name, value, callback);
+ function callback(error)
+ {
+ if (error)
+ InspectorTest.addResult("Set property value error: " + error);
+ InspectorTest.evaluateInConsole(evalInConsole, next);
+ }
+ }
+
function step1()
{
InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
@@ -42,21 +55,25 @@ var test = function()
InspectorTest.addResult("Evaluated script on the calling frame: " + result);
var pane = WebInspector.panels.sources.sidebarPanes.scopechain;
- var localsSection = pane._sections[0];
- localsSection.object.setPropertyValue("localObject", "({ a: -290})", step5);
+ localScope = pane._sections[0].object;
+ doSetPropertyValue("localObject", "({ a: -290})", "localObject.a", step5);
}
- function step5(error)
+ function step5(result)
{
- if (error)
- InspectorTest.addResult("Set property value error: " + error);
-
- InspectorTest.evaluateInConsole("localObject.a", step6);
+ InspectorTest.addResult("Evaluated script on the calling frame (after value modification): " + result);
+ doSetPropertyValue("localObject", "NaN", "localObject", step6);
}
function step6(result)
{
- InspectorTest.addResult("Evaluated script on the calling frame (after value modification): " + result);
+ InspectorTest.addResult("Expecting NaN: " + result);
+ doSetPropertyValue("localObject", "1/-Infinity", "1/localObject", step7);
+ }
+
+ function step7(result)
+ {
+ InspectorTest.addResult("Negative zero test. 1/-0 = " + result);
InspectorTest.completeDebuggerTest();
}
}

Powered by Google App Engine
This is Rietveld 408576698