Commit ea566cb9 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Fix WebViewTest.WebViewInBackgroundPage with network service

Moved the onComplete listener to before the webview request is made so
the listener can be set up when the auth request is made. This is
necessary because of how network service handles the webRequest API. See
http://crrev.com/c/1139048 for more info.

Bug: 769401
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I0537bfaac2c8ba60fc4afeffcd3c39802eda01c1
Reviewed-on: https://chromium-review.googlesource.com/1174706Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583039}
parent f1897a16
......@@ -31,13 +31,13 @@ chrome.test.runTests([
'/extensions/platform_apps/web_view/background/webview_auth.html';
var authUrl = 'http://localhost:' + port + '/auth-basic';
var webview = document.createElement('webview');
webview.request.onCompleted.addListener(function(details) {
if (authUrl == details.url) {
chrome.test.assertEq(401, details.statusCode);
chrome.test.succeed();
}
}, {urls: [authUrl]});
webview.onloadstop = function(e) {
webview.request.onCompleted.addListener(function(details) {
if (authUrl == details.url) {
chrome.test.assertEq(401, details.statusCode);
chrome.test.succeed();
}
}, {urls: ['<all_urls>']});
webview.contentWindow.postMessage({request: 'xhr', url: authUrl}, '*');
};
webview.setAttribute('src', url);
......
......@@ -10,7 +10,6 @@
-ProxySettingsApiTest.ProxyEventsInvalidProxy
-RegisterProtocolHandlerBrowserTest.CustomHandler
-SubresourceFilterBrowserTest.FailedProvisionalLoadInMainframe
-WebViewTest.WebViewInBackgroundPage
# Domain Reliability has yet to be hookup to the NetworkService.
# https://crbug.com/853251
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment