Chromium Code Reviews| 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()"); |