blob: c590fdbd0a2daf581f4b1fc7831836d998a2c87d [file] [log] [blame]
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<title>Web Test</title>
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Web Test">
<link rel="manifest" href="manifest.json">
// This is to break the serviceWorker registration, and make it throw a DOMException!
// Test for issue
window.navigator.serviceWorker.register = (url) => {
console.error('Failed to register/update a ServiceWorker for scope ', url,
': Storage access is restricted in this context due to user settings or private browsing mode.');
return Promise.reject(new DOMException('The operation is insecure.'));
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = null;
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}).then(function(engineInitializer) {
return engineInitializer.autoStart();