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

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

Issue 1209933003: ServiceWorkerClients::openWindow() should reject with TypeError for an invalid URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 602e044e8644a17447466168c38482cafc55e6ae..ff2cdee57747e7ce8fc47de3e258aeebb3ccaf27 100644
--- a/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js
+++ b/LayoutTests/http/tests/serviceworker/chromium/resources/clients-openwindow.js
@@ -61,6 +61,15 @@ var TESTS = [
});
},
+ function testOpenInvalidURL() {
+ synthesizeNotificationClick().then(function(e) {
+ clients.openWindow('http://[test].com').catch(function(error) {
+ self.postMessage('openWindow() can not open an invalid url');
+ self.postMessage('openWindow() error is: ' + error.name);
+ }).then(runNextTestOrQuit);
+ });
+ },
+
function testOpenViewSource() {
synthesizeNotificationClick().then(function(e) {
clients.openWindow('view-source://http://test.com').catch(function(c) {

Powered by Google App Engine
This is Rietveld 408576698