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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js

Issue 985043002: Relax same-origin policy for ServiceWorker openWindow() in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 9 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/chromium/resources/clients-openwindow.js
diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js b/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js
index 7c7c511f579c426fd66512cfa396bddf9abd946a..602e044e8644a17447466168c38482cafc55e6ae 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js
@@ -14,9 +14,9 @@ var TESTS = [
function testOpenCrossOriginWindow() {
synthesizeNotificationClick().then(function(e) {
- clients.openWindow('https://test.com/').catch(function(e) {
- self.postMessage('openWindow() can\'t open cross origin windows');
- self.postMessage('openWindow() error is ' + e.name);
+ clients.openWindow('https://test.com/').then(function(c) {
+ self.postMessage('openWindow() can open cross origin windows');
+ self.postMessage('openWindow() result: ' + c);
}).then(runNextTestOrQuit);
});
},
@@ -41,7 +41,42 @@ var TESTS = [
self.postMessage(' frameType: ' + c.frameType);
}).then(runNextTestOrQuit);
});
- }
+ },
+
+ function testOpenAboutBlank() {
+ synthesizeNotificationClick().then(function(e) {
+ clients.openWindow('about:blank').then(function(c) {
+ self.postMessage('openWindow() can open about:blank');
+ self.postMessage('openWindow() result: ' + c);
+ }).then(runNextTestOrQuit);
+ });
+ },
+
+ function testOpenAboutCrash() {
+ synthesizeNotificationClick().then(function(e) {
+ clients.openWindow('about:crash').then(function(c) {
+ self.postMessage('openWindow() can open about:crash');
+ self.postMessage('openWindow() result: ' + c);
+ }).then(runNextTestOrQuit);
+ });
+ },
+
+ function testOpenViewSource() {
+ synthesizeNotificationClick().then(function(e) {
+ clients.openWindow('view-source://http://test.com').catch(function(c) {
+ self.postMessage('openWindow() can not open view-source scheme');
+ }).then(runNextTestOrQuit);
+ });
+ },
+
+ function testOpenFileScheme() {
+ synthesizeNotificationClick().then(function(e) {
+ clients.openWindow('file:///').catch(function(error) {
+ self.postMessage('openWindow() can not open file scheme');
+ self.postMessage('openWindow() error is: ' + error.name);
+ }).then(runNextTestOrQuit);
+ });
+ },
];
self.onmessage = function(e) {

Powered by Google App Engine
This is Rietveld 408576698