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

Unified Diff: chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js

Issue 667483002: Account for NULL headers in streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test Created 6 years, 2 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/api_test/streams_private/handle_mime_type/background.js
diff --git a/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js b/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js
index 0d791d499fb70892b5e4c86c2f575639093a36bc..347a15006955c6b7e2a3563f465843a9768e83eb 100644
--- a/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js
+++ b/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js
@@ -12,7 +12,8 @@ chrome.streamsPrivate.onExecuteMimeTypeHandler.addListener(
// the MIME type 'application/msword' means the test has succeeded.
if (params.mimeType == 'application/msword') {
var headers = params.responseHeaders;
- if (headers['Content-Type'] != 'application/msword') {
+ if (params.originalUrl.substring(0, 5) != 'file:' &&
+ headers['Content-Type'] != 'application/msword') {
chrome.test.notifyFail(
'HTTP request header did not contain expected attributes.');
hasFailed = true;

Powered by Google App Engine
This is Rietveld 408576698