| Index: LayoutTests/http/tests/serviceworker/chromium/windowclient-navigate.html
|
| diff --git a/LayoutTests/http/tests/serviceworker/chromium/clients-openwindow.html b/LayoutTests/http/tests/serviceworker/chromium/windowclient-navigate.html
|
| similarity index 59%
|
| copy from LayoutTests/http/tests/serviceworker/chromium/clients-openwindow.html
|
| copy to LayoutTests/http/tests/serviceworker/chromium/windowclient-navigate.html
|
| index 9b54a261f4af046d02497cfb5c5a7feada41c600..d8c53c0a8fbb80174aa5f2ac3df3793c6ab478d7 100644
|
| --- a/LayoutTests/http/tests/serviceworker/chromium/clients-openwindow.html
|
| +++ b/LayoutTests/http/tests/serviceworker/chromium/windowclient-navigate.html
|
| @@ -1,5 +1,5 @@
|
| <!DOCTYPE html>
|
| -<title>Service Worker: clients.openWindow() tests (using testRunner)</title>
|
| +<title>Service Worker: WindowClient.navigate() tests (using testRunner)</title>
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <script src="../resources/test-helpers.js"></script>
|
| @@ -10,11 +10,11 @@
|
| if (window.testRunner)
|
| testRunner.setPermission('notifications', 'granted', location.origin, location.origin);
|
|
|
| -var t = async_test('clients.openWindow() behaved as expected');
|
| +var t = async_test('WindowClient.navigate() behaved as expected');
|
| t.step(function() {
|
| - var scope = 'resources/blank.html'
|
| + var scope = 'resources/'
|
| service_worker_unregister_and_register(
|
| - t, 'resources/clients-openwindow.js', scope)
|
| + t, 'resources/windowclient-navigate.js', scope)
|
| .then(function(registration) {
|
| return wait_for_state(t, registration.installing, 'activated');
|
| })
|
| @@ -27,27 +27,28 @@ t.step(function() {
|
| .catch(unreached_rejection(t));
|
|
|
| var result = [];
|
| - var expected = ['openWindow() can\'t open a window without a user interaction',
|
| - 'openWindow() error is InvalidAccessError',
|
| - 'openWindow() can open cross origin windows',
|
| - 'openWindow() result: null',
|
| - 'openWindow() can open not controlled windows',
|
| - 'openWindow() result: [object WindowClient]',
|
| - 'openWindow() can open controlled windows',
|
| - 'openWindow() result: [object WindowClient]',
|
| - ' url: ' + location.origin + '/serviceworker/chromium/resources/blank.html',
|
| + var expected = ['navigate() can navigate controlled client',
|
| + 'navigate() result: [object WindowClient]',
|
| + ' url: ' + location.origin + '/serviceworker/chromium/resources/test.html',
|
| ' visibilityState: visible',
|
| ' focused: true',
|
| ' frameType: top-level',
|
| - 'openWindow() can open about:blank',
|
| - 'openWindow() result: null',
|
| - 'openWindow() can open about:crash',
|
| - 'openWindow() result: null',
|
| - 'openWindow() can not open an invalid url',
|
| - 'openWindow() error is: TypeError',
|
| - 'openWindow() can not open view-source scheme',
|
| - 'openWindow() can not open file scheme',
|
| - 'openWindow() error is: SecurityError',
|
| + 'navigate() can navigate not controlled client',
|
| + 'navigate() result: [object WindowClient]',
|
| + 'navigate() can navigate cross origin client',
|
| + 'navigate() result: null',
|
| + 'navigate() can not navigate without a user interaction',
|
| + 'navigate() error is InvalidAccessError',
|
| + 'navigate() can not navigate an invalid url',
|
| + 'navigate() error is SyntaxError',
|
| + 'navigate() can not navigate view-source scheme',
|
| + 'navigate() error is UnknownError',
|
| + 'navigate() can not navigate file scheme',
|
| + 'navigate() error is SecurityError',
|
| + 'navigate() can not navigate about:blank',
|
| + 'navigate() error is SyntaxError',
|
| + 'navigate() can not navigate about:crash',
|
| + 'navigate() error is SyntaxError',
|
| ];
|
|
|
| // LayoutTests on Mac do not open focused windows.
|
|
|