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

Unified Diff: test/paper_tooltip_test.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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 | « test/paper_slider_test.dart ('k') | test/paper_tooltip_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/paper_tooltip_test.dart
diff --git a/test/paper_tooltip_test.dart b/test/paper_tooltip_test.dart
index 31530ca8a75699a70741aceeffd0fcf108acbd82..1374bb317f11f7cecc942018cfba43119f36a033 100644
--- a/test/paper_tooltip_test.dart
+++ b/test/paper_tooltip_test.dart
@@ -250,7 +250,7 @@ main() async {
blur(target);
return done.future;
- }, skip: 'https://github.com/dart-lang/polymer_elements/issues/52');
+ });
test('tooltip unlistens to target on detach', () {
HtmlElement f = fixture('basic');
@@ -275,14 +275,14 @@ main() async {
});
});
group('tooltip is inside a custom element', () {
- HtmlElement f;
+ TestButton f;
PaperTooltip tooltip;
HtmlElement target;
setUp(() {
f = fixture('custom');
- target = f.querySelector('#button');
- tooltip = f.querySelector('paper-tooltip');
+ target = f.$['button'];
+ tooltip = f.$['buttonTooltip'];
});
test('tooltip is shown when target is focused', () {
@@ -305,13 +305,13 @@ main() async {
expect(divRect.height, equals(20));
Rectangle contentRect = tooltip.getBoundingClientRect();
- expect(contentRect.width, equals(70));
+ expect(contentRect.width, equals(30));
expect(contentRect.height, equals(30));
// The target div width is 100, and the tooltip width is 70, and
// it's centered. The height of the target div is 20, and the
// tooltip is 14px below.
- expect(contentRect.left, equals((100 - 70) / 2));
+ expect(contentRect.left, equals((100 - 30) / 2));
expect(contentRect.top, equals(20 + 14));
// Also check the math, just in case.
@@ -328,4 +328,12 @@ main() async {
expect(tooltip.getAttribute('role'), equals('tooltip'));
});
});
+
+ // TODO(jakemac): investigate these
+ //
+ // a11ySuite('basic');
+ // a11ySuite('fitted');
+ // a11ySuite('no-text');
+ // a11ySuite('dynamic');
+ // a11ySuite('custom');
}
« no previous file with comments | « test/paper_slider_test.dart ('k') | test/paper_tooltip_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698