Chromium Code Reviews| 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 60% |
| copy from LayoutTests/http/tests/serviceworker/chromium/clients-openwindow.html |
| copy to LayoutTests/http/tests/serviceworker/chromium/windowclient-navigate.html |
| index 9b54a261f4af046d02497cfb5c5a7feada41c600..a827c1a64077ff65add45697cf13733f49bb6d56 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); |
|
nhiroki
2015/07/15 08:53:14
I think we can re-write these tests using iframes
zino
2015/09/22 07:53:31
Done.
|
| -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,26 @@ 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 to a cross origin url', |
| + 'navigate() result: null', |
| + 'navigate() can not navigate to an invalid url', |
| + 'navigate() error is TypeError', |
| + 'navigate() can not navigate to view-source scheme', |
| + 'navigate() error is UnknownError', |
| + 'navigate() can not navigate to file scheme', |
| + 'navigate() error is SecurityError', |
| + 'navigate() can not navigate to about:blank', |
| + 'navigate() error is TypeError', |
| + 'navigate() can not navigate to about:crash', |
| + 'navigate() error is TypeError', |
| ]; |
| // LayoutTests on Mac do not open focused windows. |