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

Unified Diff: tests/html/element_test.dart

Issue 12226129: Updating Element.scrollIntoView to be platform independent. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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: tests/html/element_test.dart
diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart
index 981db6d26224e4c4a49c65aa1abcf40270f5ced1..a1df4a424228e1bd773ea29a4b471038f8f5f9a1 100644
--- a/tests/html/element_test.dart
+++ b/tests/html/element_test.dart
@@ -618,6 +618,30 @@ main() {
testUnsupported('removeLast', () => getQueryAll().removeLast());
});
+ group('functional', () {
+ test('scrollIntoView', () {
+ var child = new DivElement();
+ document.body.append(child);
+ child.style.height = '10px';
+ child.style.marginTop = '200px';
+
+ expect(() {
+ child.scrollIntoView(alignCenter: true, alignTop: true);
+ }, throws);
+ expect(() {
+ child.scrollIntoView(alignCenter: true, alignBottom: true);
+ }, throws);
+ expect(() {
+ child.scrollIntoView(alignTop: true, alignBottom: true);
+ }, throws);
+
+ child.scrollIntoView(alignTop: true);
+ child.scrollIntoView(alignCenter: true);
+ child.scrollIntoView(alignBottom: true);
+ child.scrollIntoView();
+ });
+ });
+
group('_ElementList', () {
List<Element> makeElList() => makeElementWithChildren().children;

Powered by Google App Engine
This is Rietveld 408576698