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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html

Issue 2562523003: Set the document URL of ServiceWorkerProviderHost when redirected even if skip_service_worker is set (Closed)
Patch Set: incorporated shimazu's comment Created 4 years 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: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html
new file mode 100644
index 0000000000000000000000000000000000000000..ea2678681889ab0e8d66ed35990487cef3a33141
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-bypass-for-network-redirect.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="service-workers-test.js"></script>
+<script src="../resources-test.js"></script>
+<script>
+
+function loadIframe()
+{
+ var frame = document.createElement('iframe');
+ frame.src = "http://localhost:8000/inspector/service-workers/resources/" +
+ "bypass-for-network-redirect.php"
+ document.body.appendChild(frame);
+}
+
+function test()
+{
+ UI.inspectorView.showPanel("sources")
+ .then(function(){
+ Common.settings.settingForTest("bypassServiceWorker").set(true);
+ var callback;
+ var promise = new Promise((fulfill) => callback = fulfill);
+ InspectorTest.addConsoleSniffer(message => {
+ if (message.messageText == "getRegistration finished") {
+ callback();
+ }
+ }, true);
+ InspectorTest.evaluateInPage("loadIframe()");
+ return promise;
+ })
+ .then(function() {
+ InspectorTest.addResult("Success");
+ InspectorTest.completeTest();
+ })
+ .catch(function(exception) {
+ InspectorTest.addResult("Error");
+ InspectorTest.addResult(exception);
+ InspectorTest.completeTest();
+ });
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests "Bypass for network" checkbox with redirection doesn't cause crash.<p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698