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

Unified Diff: LayoutTests/http/tests/serviceworker/client-focus.html

Issue 866043005: [ServiceWorker] Tests for WindowClient.focus(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sw_openwindow_tests
Patch Set: review comment Created 5 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: LayoutTests/http/tests/serviceworker/client-focus.html
diff --git a/LayoutTests/http/tests/serviceworker/client-focus.html b/LayoutTests/http/tests/serviceworker/client-focus.html
deleted file mode 100644
index aa1153db23fb8b30fc303a3a90b923277c1cab89..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/serviceworker/client-focus.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<title>Service Worker: WindowClient.focus()</title>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="resources/test-helpers.js"></script>
-<script>
-var t = async_test('Test WindowClient.focus()');
-t.step(function() {
- var scope = 'resources/blank.html'
- service_worker_unregister_and_register(
- t, 'resources/client-focus.js', scope)
- .then(function(registration) {
- return wait_for_state(t, registration.installing, 'activated');
- })
- .then(function() { return with_iframe(scope); })
- .then(function(frame) {
- var w = frame.contentWindow;
- w.onmessage = t.step_func(onMessage);
- w.navigator.serviceWorker.controller.postMessage('ping');
- })
- .catch(unreached_rejection(t));
-
- var result = [];
- var expected = ['focus() is present',
- 'focus() failed with InvalidAccessError'];
-
- function onMessage(e) {
- var message = e.data;
- if (message === 'quit') {
- assert_array_equals(result, expected,
- 'Worker should post back expected messages.');
- service_worker_unregister_and_done(t, scope);
- } else {
- result.push(message);
- }
- }
- });
-</script>

Powered by Google App Engine
This is Rietveld 408576698