diff options
6 files changed, 27 insertions, 27 deletions
diff --git a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc index c49dc7a..378b924 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc @@ -62,23 +62,23 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { } // For relative path "/text_path_attch.txt", return success response with - // MIME type "plain/text" and content "txt content". Also, set content + // MIME type "text/plain" and content "txt content". Also, set content // disposition to be attachment. if (request.relative_url == "/text_path_attch.txt") { response->set_code(net::HTTP_OK); response->set_content("txt content"); - response->set_content_type("plain/text"); + response->set_content_type("text/plain"); response->AddCustomHeader("Content-Disposition", "attachment; filename=test_path.txt"); return response.PassAs<HttpResponse>(); } // For relative path "/test_path_attch.txt", return success response with - // MIME type "plain/text" and content "txt content". + // MIME type "text/plain" and content "txt content". if (request.relative_url == "/text_path.txt") { response->set_code(net::HTTP_OK); response->set_content("txt content"); - response->set_content_type("plain/text"); + response->set_content_type("text/plain"); return response.PassAs<HttpResponse>(); } @@ -106,7 +106,7 @@ scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { // StreamsResourceThrottle. // The test extension expects the resources that should be handed to the // extension to have MIME type 'application/msword' and the resources that -// should be downloaded by the browser to have MIME type 'plain/text'. +// should be downloaded by the browser to have MIME type 'text/plain'. class StreamsPrivateApiTest : public ExtensionApiTest { public: StreamsPrivateApiTest() {} @@ -168,10 +168,10 @@ class StreamsPrivateApiTest : public ExtensionApiTest { } // Loads the test extension and set's up its file_browser_handler to handle - // 'application/msword' and 'plain/text' MIME types. + // 'application/msword' and 'text/plain' MIME types. // The extension will notify success when it detects an event with the MIME // type 'application/msword' and notify fail when it detects an event with the - // MIME type 'plain/text'. + // MIME type 'text/plain'. const extensions::Extension* LoadTestExtension() { // The test extension id is set by the key value in the manifest. test_extension_id_ = "oickdpebdnfbgkcaoklfcdhjniefkcji"; @@ -321,7 +321,7 @@ IN_PROC_BROWSER_TEST_F(StreamsPrivateApiTest, NavigateToAnAttachment) { // The test extension should not receive any events by now. Send it an event // with MIME type "test/done", so it stops waiting for the events. (If there - // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will + // was an event with MIME type 'text/plain', |catcher.GetNextResult()| will // fail regardless of the sent event; chrome.test.notifySuccess will not be // called by the extension). SendDoneEvent(); @@ -373,7 +373,7 @@ IN_PROC_BROWSER_TEST_F(StreamsPrivateApiTest, DirectDownload) { // The test extension should not receive any events by now. Send it an event // with MIME type "test/done", so it stops waiting for the events. (If there - // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will + // was an event with MIME type 'text/plain', |catcher.GetNextResult()| will // fail regardless of the sent event; chrome.test.notifySuccess will not be // called by the extension). SendDoneEvent(); diff --git a/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc b/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc index cb1e252..dfdf7d8 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc @@ -28,34 +28,34 @@ class StreamsPrivateManifestTest : public ExtensionManifestTest { TEST_F(StreamsPrivateManifestTest, ValidMimeTypesHandlerMIMETypes) { scoped_refptr<const Extension> extension = ExtensionBuilder() - .SetID(extension_misc::kQuickOfficeExtensionId) - .SetManifest(DictionaryBuilder() + .SetID(extension_misc::kQuickOfficeExtensionId) + .SetManifest( + DictionaryBuilder() .Set("name", "MIME type handler test") .Set("version", "1.0.0") .Set("manifest_version", 2) - .Set("mime_types", ListBuilder() - .Append("plain/text"))) - .Build(); + .Set("mime_types", ListBuilder().Append("text/plain"))) + .Build(); ASSERT_TRUE(extension.get()); MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension.get()); ASSERT_TRUE(handler != NULL); - EXPECT_FALSE(handler->CanHandleMIMEType("plain/html")); - EXPECT_TRUE(handler->CanHandleMIMEType("plain/text")); + EXPECT_FALSE(handler->CanHandleMIMEType("text/html")); + EXPECT_TRUE(handler->CanHandleMIMEType("text/plain")); } TEST_F(StreamsPrivateManifestTest, MimeTypesHandlerMIMETypesNotWhitelisted) { scoped_refptr<const Extension> extension = ExtensionBuilder() - .SetManifest(DictionaryBuilder() + .SetManifest( + DictionaryBuilder() .Set("name", "MIME types test") .Set("version", "1.0.0") .Set("manifest_version", 2) - .Set("mime_types", ListBuilder() - .Append("plain/text"))) - .Build(); + .Set("mime_types", ListBuilder().Append("text/plain"))) + .Build(); ASSERT_TRUE(extension.get()); 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 a944906..b60b6c6 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 @@ -15,12 +15,12 @@ chrome.streamsPrivate.onExecuteMimeTypeHandler.addListener( return; } - // The tests are setup so resources with MIME type 'plain/text' are meant to + // The tests are setup so resources with MIME type 'text/plain' are meant to // be handled by the browser (i.e. downloaded). The extension getting event - // with MIME type 'plain/text' is thus a failure. - if (params.mimeType == 'plain/text') { + // with MIME type 'text/plain' is thus a failure. + if (params.mimeType == 'text/plain') { chrome.test.notifyFail( - 'Unexpected request to handle "plain/text" MIME type.'); + 'Unexpected request to handle "text/plain" MIME type.'); // Set |hasFailed| so notifyPass doesn't get called later (when event with // MIME type 'test/done' is received). hasFailed = true; diff --git a/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/manifest.json b/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/manifest.json index 6dce5da..bc7758f 100644 --- a/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/manifest.json +++ b/chrome/test/data/extensions/api_test/streams_private/handle_mime_type/manifest.json @@ -8,7 +8,7 @@ }, "mime_types": [ "application/msword", - "plain/text" + "text/plain" ], "permissions": [ "streamsPrivate" diff --git a/content/browser/streams/stream_url_request_job.cc b/content/browser/streams/stream_url_request_job.cc index 09b9e6d..6d70eef 100644 --- a/content/browser/streams/stream_url_request_job.cc +++ b/content/browser/streams/stream_url_request_job.cc @@ -226,7 +226,7 @@ void StreamURLRequestJob::HeadersCompleted(net::HttpStatusCode status_code) { if (status_code == net::HTTP_OK) { std::string content_type_header(net::HttpRequestHeaders::kContentType); content_type_header.append(": "); - content_type_header.append("plain/text"); + content_type_header.append("text/plain"); headers->AddHeader(content_type_header); } diff --git a/ppapi/examples/file_chooser/file_chooser.cc b/ppapi/examples/file_chooser/file_chooser.cc index fd207fe..f220dd8 100644 --- a/ppapi/examples/file_chooser/file_chooser.cc +++ b/ppapi/examples/file_chooser/file_chooser.cc @@ -46,7 +46,7 @@ class MyInstance : public pp::InstancePrivate { PP_FileChooserMode_Dev mode = (multi_select ? PP_FILECHOOSERMODE_OPENMULTIPLE : PP_FILECHOOSERMODE_OPEN); - std::string accept_types = (multi_select ? "" : "plain/text"); + std::string accept_types = (multi_select ? "" : "text/plain"); chooser_ = pp::FileChooser_Dev(this, mode, accept_types); chooser_.Show(callback_factory_.NewCallbackWithOutput( |