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

Unified Diff: LayoutTests/fast/canvas/webgl/array-unit-tests.html

Issue 11889014: Merge 139459 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/webgl/array-unit-tests.html
===================================================================
--- LayoutTests/fast/canvas/webgl/array-unit-tests.html (revision 139639)
+++ LayoutTests/fast/canvas/webgl/array-unit-tests.html (working copy)
@@ -544,6 +544,16 @@
}
}
+function testConstructionWithExceptionThrowingObject(type, name) {
+ var o = {};
+ Object.defineProperty(o, "length", { get: function() { throw "bail;" }});
+ try {
+ var array = new type(o);
+ } catch (e) {
+ }
+ testPassed("Construction of " + name + " with exception-throwing array-like object didn't crash unexpectedly");
+}
+
function shouldThrowIndexSizeErr(func, text) {
var errorText = text + " should throw an exception";
try {
@@ -1063,6 +1073,7 @@
testCase.testValues,
testCase.expectedValues);
testConstructionWithNullBuffer(type, name);
+ testConstructionWithExceptionThrowingObject(type, name);
testConstructionWithOutOfRangeValues(type, name);
testConstructionWithNegativeOutOfRangeValues(type, name);
testConstructionWithUnalignedOffset(type, name, testCase.elementSizeInBytes);
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/webgl/array-unit-tests-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698