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

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

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile* => void* Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/platform_apps/web_view/shim/main.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
index 3c788dc12902b46248267f4a4c5d952ec1f5fc88..a172e4d9a641536be76172dffbfc4443f6471342 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
@@ -409,6 +409,20 @@ chrome.test.getConfig(function(config) {
});
webview.setAttribute('src', 'data:text/html,trigger navigation');
document.body.appendChild(webview);
+ },
+
+ function webViewWebRequestAPI() {
+ var webview = document.createElement('webview');
+ webview.setAttribute('src', 'data:text/html,trigger navigation');
+ var firstLoad = function() {
+ webview.removeEventListener('loadstop', firstLoad);
+ webview.onBeforeRequest.addListener(function(e) {
+ chrome.test.succeed();
+ }, { urls: ['<all_urls>']}, ['blocking']) ;
+ webview.src = windowOpenGuestURL;
+ };
+ webview.addEventListener('loadstop', firstLoad);
+ document.body.appendChild(webview);
}
]);
});

Powered by Google App Engine
This is Rietveld 408576698