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

Side by Side Diff: LayoutTests/http/tests/serviceworker/chromium/resources/fetch-script-onerror-iframe.html

Issue 1151433002: Add LayoutTest for the script error sanitization for ServiceWorker fetched scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: s/messageCallback/message_callback Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <script src="../../../resources/get-host-info.js"></script>
2 <script>
3 var host_info = get_host_info();
4
5 window.addEventListener('error', function(evt) {
6 window.parent.postMessage(
7 {
8 filename: evt.filename,
9 colno: evt.colno,
10 lineno: evt.lineno,
11 message: evt.message
12 },
13 host_info['HTTP_ORIGIN']);
14 });
15
16 window.addEventListener('message', function(evt) {
17 var script = document.createElement('script');
18 script.src = evt.data.url;
19 document.body.appendChild(script);
20 });
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698