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

Unified Diff: components/drive/drive_uploader_unittest.cc

Issue 2485253002: Remove unnecessary calls to GURL() (Closed)
Patch Set: Assert that StringPiece must always be canonicalized. Fix some constants. Created 4 years, 1 month 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: components/drive/drive_uploader_unittest.cc
diff --git a/components/drive/drive_uploader_unittest.cc b/components/drive/drive_uploader_unittest.cc
index 99c1d66aa9cd883d72f981a59912216824dd7d71..182947d45841a001a59edfd4a13b519d6ddfd884 100644
--- a/components/drive/drive_uploader_unittest.cc
+++ b/components/drive/drive_uploader_unittest.cc
@@ -170,8 +170,8 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
EXPECT_EQ(expected_chunk_end, end_position);
// The upload URL returned by InitiateUpload() must be used.
- EXPECT_TRUE(GURL(kTestUploadNewFileURL) == upload_location ||
- GURL(kTestUploadExistingFileURL) == upload_location);
+ EXPECT_TRUE(upload_location == kTestUploadNewFileURL ||
+ upload_location == kTestUploadExistingFileURL);
// Other parameters should be the exact values passed to DriveUploader.
EXPECT_EQ(expected_content_length_, content_length);
@@ -200,8 +200,8 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
const UploadRangeCallback& callback) override {
EXPECT_EQ(expected_content_length_, content_length);
// The upload URL returned by InitiateUpload() must be used.
- EXPECT_TRUE(GURL(kTestUploadNewFileURL) == upload_location ||
- GURL(kTestUploadExistingFileURL) == upload_location);
+ EXPECT_TRUE(upload_location == kTestUploadNewFileURL ||
+ upload_location == kTestUploadExistingFileURL);
SendUploadRangeResponse(upload_location, callback);
return CancelCallback();
@@ -215,7 +215,7 @@ class MockDriveServiceWithUploadExpectation : public DummyDriveService {
std::unique_ptr<FileResource> entry;
if (received_bytes_ == expected_content_length_) {
DriveApiErrorCode response_code =
- upload_location == GURL(kTestUploadNewFileURL) ?
+ upload_location == kTestUploadNewFileURL ?
HTTP_CREATED : HTTP_SUCCESS;
response = UploadRangeResponse(response_code, -1, -1);
« no previous file with comments | « components/data_usage/core/data_use_aggregator_unittest.cc ('k') | components/error_page/renderer/net_error_helper_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698