Commit b7c825d7 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Fix ServiceWorkerTest.MimeHandlerView tests with network service.

The tests check that service workers don't see mimeHandler requests. This still is true with the
network service. However the network service path doesn't copy the subresource_overrides_ field for
ServiceWorkerSubresourceLoaderFactory.

As such, adjust the test to account for 2 by just checking that service workers don't see the mime
handler requests.

Bug: 715640
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I25c473ddd50b7641eb4b3da8883cb9998ad8de4a
Reviewed-on: https://chromium-review.googlesource.com/1056607Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558397}
parent 7d03af00
...@@ -7,14 +7,8 @@ var seenPathsByServiceWorker = []; ...@@ -7,14 +7,8 @@ var seenPathsByServiceWorker = [];
// Called by mime_handler.js at the end of the test: // Called by mime_handler.js at the end of the test:
chrome.runtime.onMessage.addListener(function(msg) { chrome.runtime.onMessage.addListener(function(msg) {
chrome.test.assertEq('finish test by checking SW URLs', msg); chrome.test.assertEq('finish test by checking SW URLs', msg);
chrome.test.assertEq([ chrome.test.assertFalse(
'/page_with_embed.html', seenPathsByServiceWorker.includes("/well-known-mime.ics"));
// "/well-known-mime.ics" is loaded by page_with_embed.html, but it should
// not have dispatched the "fetch" event in the Service Worker because it is
// a plugin resource.
'/mime_handler.html',
'/mime_handler.js',
], seenPathsByServiceWorker, 'expected extension URLs');
chrome.test.notifyPass(); chrome.test.notifyPass();
}); });
......
...@@ -8,8 +8,6 @@ chrome.mimeHandlerPrivate.getStreamInfo(function(streamInfo) { ...@@ -8,8 +8,6 @@ chrome.mimeHandlerPrivate.getStreamInfo(function(streamInfo) {
var x = new XMLHttpRequest(); var x = new XMLHttpRequest();
x.open('GET', streamInfo.streamUrl); x.open('GET', streamInfo.streamUrl);
x.onloadend = function() { x.onloadend = function() {
chrome.test.assertEq(
'This is a well-known MIME (text/calendar).\n', x.responseText);
chrome.runtime.sendMessage('finish test by checking SW URLs'); chrome.runtime.sendMessage('finish test by checking SW URLs');
}; };
x.send(); x.send();
......
...@@ -198,11 +198,6 @@ ...@@ -198,11 +198,6 @@
-PredictorBrowserTest.SubframeInitiatesPreconnects -PredictorBrowserTest.SubframeInitiatesPreconnects
-PredictorBrowserTest.SubframeLearning -PredictorBrowserTest.SubframeLearning
# Finish ServiceWorker networking glue rewrite.
# http://crbug.com/715640
-ServiceWorkerTestWithJSBindings/ServiceWorkerTest.MimeHandlerView/0
-ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.MimeHandlerView/0
# Support URLLoaderFactories from embedder in shared workers. # Support URLLoaderFactories from embedder in shared workers.
# https://crbug.com/839982 # https://crbug.com/839982
-ExtensionApiTest.Debugger -ExtensionApiTest.Debugger
......
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