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

Side by Side Diff: test/mjsunit/delete.js

Issue 1873833002: [elements] Add more tests to increase coverage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 delete x.a; 171 delete x.a;
172 assertTrue(typeof load_a(x) === 'undefined', "x.a is gone"); 172 assertTrue(typeof load_a(x) === 'undefined', "x.a is gone");
173 assertTrue(typeof load_a(x) === 'undefined', "x.a is gone"); 173 assertTrue(typeof load_a(x) === 'undefined', "x.a is gone");
174 } 174 }
175 175
176 function load_a(x) { 176 function load_a(x) {
177 return x.a; 177 return x.a;
178 } 178 }
179 179
180 load_deleted_property_using_IC(); 180 load_deleted_property_using_IC();
181
182
183 (function deleteLargeDoubleArrayAtEnd() {
184 var o = {};
185 var max = 100000;
186 for (var i = 0; i <= max; i++) {
187 o[i] = 1.1;
188 }
189 delete o[max];
190 for (var i = 0; i < max; i++) {
191 assertEquals(1.1, o[i]);
192 }
193 assertEquals(undefined, o[max]);
194 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698