| 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>
|
|
|