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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js

Issue 289283002: Add some layout tests about behavior on undefined and null. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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 unified diff | Download patch
OLDNEW
1 var CShape = function(context, usePathObject) { 1 var CShape = function(context, usePathObject) {
2 this._context = context; 2 this._context = context;
3 3
4 if (usePathObject) 4 if (usePathObject)
5 this._path = new Path2D(); 5 this._path = new Path2D();
6 else 6 else
7 this._path = context; 7 this._path = context;
8 }; 8 };
9 9
10 CShape.prototype.usePathObject = function() { 10 CShape.prototype.usePathObject = function() {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 debug("Test case 4: scrollPathIntoView(path2d) / CTM != identity"); 147 debug("Test case 4: scrollPathIntoView(path2d) / CTM != identity");
148 scrollTest(CRect, 20, true, 136); 148 scrollTest(CRect, 20, true, 136);
149 scrollTest(CCapsule, 42, true, 126); 149 scrollTest(CCapsule, 42, true, 126);
150 scrollTest(CCurve, 63, true, 133); 150 scrollTest(CCurve, 63, true, 133);
151 scrollTest(CStar, 40, true, 160); 151 scrollTest(CStar, 40, true, 160);
152 debug(""); 152 debug("");
153 153
154 debug("Test case 5: exceptions"); 154 debug("Test case 5: exceptions");
155 shouldThrow("context.scrollPathIntoView(null);"); 155 shouldThrow("context.scrollPathIntoView(null);");
156 shouldThrow("context.scrollPathIntoView(undefined);");
156 shouldThrow("context.scrollPathIntoView([]);"); 157 shouldThrow("context.scrollPathIntoView([]);");
157 shouldThrow("context.scrollPathIntoView({});"); 158 shouldThrow("context.scrollPathIntoView({});");
158 debug(""); 159 debug("");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698