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

Unified Diff: WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart

Issue 1375963002: Revert "Change focus test to use more current test infrastructure. Seemed to be depending on a poss… (Closed) Base URL: https://github.com/dart-lang/co19.git@integration
Patch Set: Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart
diff --git a/WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart b/WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart
index e245fe2a288a55c84fbefc7ac35bbce0d78dfb70..07e4071be8c79e7499948bb1386727b0315f9b9c 100644
--- a/WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart
+++ b/WebPlatformTest/shadow-dom/events/retargeting-focus-events/test-002_t01.dart
@@ -16,34 +16,35 @@
*/
import 'dart:html';
-import 'package:unittest/unittest.dart' as unittest;
-import 'package:unittest/html_individual_config.dart';
+import "../../../../Utils/expect.dart";
+import "../../../../Utils/async_utils.dart";
import '../../testcommon.dart';
main() {
+ var d = document;
- useHtmlIndividualConfiguration();
- unittest.test("focus retargeting", () {
- var d = document;
+ var invoked = false;
- var invoked = false;
+ var roots = createTestMediaPlayer(d);
- var roots = createTestMediaPlayer(d);
+ roots.playerShadowRoot.querySelector('.volume-slider').focus();
- roots.playerShadowRoot.querySelector('.volume-slider').focus();
+ asyncStart();
- //expected result of what relative target should be see
- //see at http://www.w3.org/TR/shadow-dom/#event-retargeting-example
+ //expected result of what relative target should be see
+ //see at http://www.w3.org/TR/shadow-dom/#event-retargeting-example
- //For #volume-slider relative target is #volume-slider
- roots.playerShadowRoot.querySelector('.volume-slider')
- .addEventListener('blur', unittest.expectAsync((event) {
- invoked = true;
- unittest.expect(event.target.getAttribute('id'), 'volume-slider',
- reason: 'Wrong target');
- }));
+ //For #volume-slider relative target is #volume-slider
+ roots.playerShadowRoot.querySelector('.volume-slider')
+ .addEventListener('blur', (event) {
+ invoked = true;
+ assert_equals(event.target.getAttribute('id'), 'volume-slider',
+ 'Wrong target');
+ asyncEnd();
+ }, false);
- // move focus out of shadow tree. blur should be fired
- d.querySelector('#outside-control').focus();
- });
+ // move focus out of shadow tree. blur should be fired
+ d.querySelector('#outside-control').focus();
+
+ assert_true(invoked, 'Event listener was not invoked');
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698