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

Unified Diff: test/mjsunit/getter-in-prototype.js

Issue 7064027: Change calls to undefined property setters to not throw (fixes issue 1355). (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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: test/mjsunit/getter-in-prototype.js
===================================================================
--- test/mjsunit/getter-in-prototype.js (revision 8026)
+++ test/mjsunit/getter-in-prototype.js (working copy)
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Test that exceptions are thrown when setting properties on object
+// Test that exceptions are not thrown when setting properties on object
// that have only a getter in a prototype object.
var o = {};
@@ -34,25 +34,25 @@
p.__defineGetter__(0, function(){});
o.__proto__ = p;
-assertThrows("o.x = 42");
-assertThrows("o[0] = 42");
+assertDoesNotThrow("o.x = 42");
+assertDoesNotThrow("o[0] = 42");
function f() {
with(o) {
x = 42;
}
}
-assertThrows("f()");
+assertDoesNotThrow("f()");
Lasse Reichstein 2011/05/25 07:20:53 Cleanup: Just do assertDoesNotThrow(f); It can t
Rico 2011/05/25 07:59:28 Ah, thanks, did not know that, changed here and be
__proto__ = p;
function g() {
eval('1');
x = 42;
}
-assertThrows("g()");
+assertDoesNotThrow("g()");
__proto__ = p;
function g2() {
this[0] = 42;
}
-assertThrows("g2()");
+assertDoesNotThrow("g2()");

Powered by Google App Engine
This is Rietveld 408576698