| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 extension->GetResourceURL("webstore_icon_16.png"), | 370 extension->GetResourceURL("webstore_icon_16.png"), |
| 371 net::DEFAULT_PRIORITY, &test_delegate_, | 371 net::DEFAULT_PRIORITY, &test_delegate_, |
| 372 TRAFFIC_ANNOTATION_FOR_TESTS)); | 372 TRAFFIC_ANNOTATION_FOR_TESTS)); |
| 373 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); | 373 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); |
| 374 EXPECT_EQ(net::OK, test_delegate_.request_status()); | 374 EXPECT_EQ(net::OK, test_delegate_.request_status()); |
| 375 CheckForContentLengthHeader(request.get()); | 375 CheckForContentLengthHeader(request.get()); |
| 376 } | 376 } |
| 377 | 377 |
| 378 // And then test it with the extension disabled. | 378 // And then test it with the extension disabled. |
| 379 extension_info_map_->RemoveExtension(extension->id(), | 379 extension_info_map_->RemoveExtension(extension->id(), |
| 380 UnloadedExtensionInfo::REASON_DISABLE); | 380 UnloadedExtensionReason::DISABLE); |
| 381 { | 381 { |
| 382 std::unique_ptr<net::URLRequest> request( | 382 std::unique_ptr<net::URLRequest> request( |
| 383 resource_context_.GetRequestContext()->CreateRequest( | 383 resource_context_.GetRequestContext()->CreateRequest( |
| 384 extension->GetResourceURL("webstore_icon_16.png"), | 384 extension->GetResourceURL("webstore_icon_16.png"), |
| 385 net::DEFAULT_PRIORITY, &test_delegate_, | 385 net::DEFAULT_PRIORITY, &test_delegate_, |
| 386 TRAFFIC_ANNOTATION_FOR_TESTS)); | 386 TRAFFIC_ANNOTATION_FOR_TESTS)); |
| 387 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); | 387 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); |
| 388 EXPECT_EQ(net::OK, test_delegate_.request_status()); | 388 EXPECT_EQ(net::OK, test_delegate_.request_status()); |
| 389 CheckForContentLengthHeader(request.get()); | 389 CheckForContentLengthHeader(request.get()); |
| 390 } | 390 } |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 content_verifier_->OnExtensionLoaded(testing_profile_.get(), extension.get()); | 598 content_verifier_->OnExtensionLoaded(testing_profile_.get(), extension.get()); |
| 599 // Wait for PostTask to ContentVerifierIOData::AddData() to finish. | 599 // Wait for PostTask to ContentVerifierIOData::AddData() to finish. |
| 600 content::RunAllPendingInMessageLoop(); | 600 content::RunAllPendingInMessageLoop(); |
| 601 | 601 |
| 602 // Request foo.js. | 602 // Request foo.js. |
| 603 EXPECT_EQ(net::OK, DoRequest(*extension, kFooJs)); | 603 EXPECT_EQ(net::OK, DoRequest(*extension, kFooJs)); |
| 604 test_job_delegate.WaitForDoneReading(extension->id()); | 604 test_job_delegate.WaitForDoneReading(extension->id()); |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace extensions | 607 } // namespace extensions |
| OLD | NEW |