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

Side by Side Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 2042483002: Fix web_accesible_resources enforcement for Site Isolation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for code review, removed filter exceptions. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var util = {}; 5 var util = {};
6 var embedder = {}; 6 var embedder = {};
7 embedder.baseGuestURL = ''; 7 embedder.baseGuestURL = '';
8 embedder.emptyGuestURL = ''; 8 embedder.emptyGuestURL = '';
9 embedder.windowOpenGuestURL = ''; 9 embedder.windowOpenGuestURL = '';
10 embedder.noReferrerGuestURL = ''; 10 embedder.noReferrerGuestURL = '';
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 }); 1969 });
1970 document.body.appendChild(webview); 1970 document.body.appendChild(webview);
1971 } 1971 }
1972 1972
1973 // This test verifies that the loadabort event fires when loading a webview 1973 // This test verifies that the loadabort event fires when loading a webview
1974 // accessible resource from a partition that is not privileged. 1974 // accessible resource from a partition that is not privileged.
1975 function testLoadAbortChromeExtensionURLWrongPartition() { 1975 function testLoadAbortChromeExtensionURLWrongPartition() {
1976 var localResource = chrome.runtime.getURL('guest.html'); 1976 var localResource = chrome.runtime.getURL('guest.html');
1977 var webview = document.createElement('webview'); 1977 var webview = document.createElement('webview');
1978 webview.addEventListener('loadabort', function(e) { 1978 webview.addEventListener('loadabort', function(e) {
1979 embedder.test.assertEq(-109, e.code); 1979 embedder.test.assertEq(-20, e.code);
1980 embedder.test.assertEq('ERR_ADDRESS_UNREACHABLE', e.reason); 1980 embedder.test.assertEq('ERR_BLOCKED_BY_CLIENT', e.reason);
1981 embedder.test.succeed(); 1981 embedder.test.succeed();
1982 }); 1982 });
1983 webview.addEventListener('loadstop', function(e) { 1983 webview.addEventListener('loadstop', function(e) {
1984 embedder.test.fail(); 1984 embedder.test.fail();
1985 }); 1985 });
1986 webview.setAttribute('src', localResource); 1986 webview.setAttribute('src', localResource);
1987 document.body.appendChild(webview); 1987 document.body.appendChild(webview);
1988 } 1988 }
1989 1989
1990 // This test verifies that the loadabort event fires as expected and with the 1990 // This test verifies that the loadabort event fires as expected and with the
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 'testRendererNavigationRedirectWhileUnattached': 3069 'testRendererNavigationRedirectWhileUnattached':
3070 testRendererNavigationRedirectWhileUnattached 3070 testRendererNavigationRedirectWhileUnattached
3071 }; 3071 };
3072 3072
3073 onload = function() { 3073 onload = function() {
3074 chrome.test.getConfig(function(config) { 3074 chrome.test.getConfig(function(config) {
3075 embedder.setUp_(config); 3075 embedder.setUp_(config);
3076 chrome.test.sendMessage("Launched"); 3076 chrome.test.sendMessage("Launched");
3077 }); 3077 });
3078 }; 3078 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698