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

Side by Side Diff: LayoutTests/inspector/runtime/runtime-setPropertyValue.html

Issue 83383002: DevTools: Allow setting -0 value to object property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years 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
« no previous file with comments | « no previous file | LayoutTests/inspector/runtime/runtime-setPropertyValue-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 var object1 = { foo: 1 }; 6 var object1 = { foo: 1 };
7 var object2 = { bar: 2 }; 7 var object2 = { bar: 2 };
8 8
9 function dumpObject(label) 9 function dumpObject(label)
10 { 10 {
11 console.log("===== " + label + " ====="); 11 console.log("===== " + label + " =====");
12 console.log(JSON.stringify(object1, replacer)); 12 console.log(JSON.stringify(object1, replacer));
13 console.log(""); 13 console.log("");
14 14
15 function replacer(key, value) 15 function replacer(key, value)
16 { 16 {
17 if (typeof value === "number" && !isFinite(value)) 17 if (typeof value === "number" && !isFinite(value))
18 return String(value); 18 return String(value);
19 return value; 19 return value;
20 } 20 }
21 } 21 }
22 22
23 function checkNegativeZero()
24 {
25 console.log("===== Checking negative zero =====");
26 console.log("1/-0 = " + (1 / object1.foo));
27 }
28
23 function test() 29 function test()
24 { 30 {
25 var obj1, obj2; 31 var obj1, obj2;
26 32
27 InspectorTest.runTestSuite([ 33 InspectorTest.runTestSuite([
28 function testSetUp(next) 34 function testSetUp(next)
29 { 35 {
30 InspectorTest.evaluateInPage("dumpObject('Initial')", step0); 36 InspectorTest.evaluateInPage("dumpObject('Initial')", step0);
31 37
32 function step0() 38 function step0()
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 { 137 {
132 obj1.setPropertyValue("foo2", "-Infinity", step3); 138 obj1.setPropertyValue("foo2", "-Infinity", step3);
133 } 139 }
134 140
135 function step3(error) 141 function step3(error)
136 { 142 {
137 InspectorTest.evaluateInPage("dumpObject('Set non-finite numbers ')", next); 143 InspectorTest.evaluateInPage("dumpObject('Set non-finite numbers ')", next);
138 } 144 }
139 }, 145 },
140 146
147 function testNegativeZero(next)
148 {
149 obj1.setPropertyValue("foo", "1/-Infinity", step1);
150
151 function step1(error)
152 {
153 InspectorTest.evaluateInPage("checkNegativeZero()", next);
154 }
155 },
156
141 function testReleaseObjectIsCalled(next) 157 function testReleaseObjectIsCalled(next)
142 { 158 {
143 // If failed, this test will time out. 159 // If failed, this test will time out.
144 InspectorTest.addSniffer(RuntimeAgent, "releaseObject", next); 160 InspectorTest.addSniffer(RuntimeAgent, "releaseObject", next);
145 obj1.setPropertyValue("foo", "[1,2,3]", function(){}); 161 obj1.setPropertyValue("foo", "[1,2,3]", function(){});
146 } 162 }
147 ]); 163 ]);
148 } 164 }
149 165
150 </script> 166 </script>
151 </head> 167 </head>
152 168
153 <body onload="runTest()"> 169 <body onload="runTest()">
154 <p> 170 <p>
155 Tests WebInspector.RemoveObject.setPropertyValue implementation. 171 Tests WebInspector.RemoveObject.setPropertyValue implementation.
156 </p> 172 </p>
157 173
158 </body> 174 </body>
159 </html> 175 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/runtime/runtime-setPropertyValue-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698