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

Side by Side Diff: chrome/browser/printing/cloud_print/privet_notifications_unittest.cc

Issue 2485253002: Remove unnecessary calls to GURL() (Closed)
Patch Set: Fix broken tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/printing/cloud_print/privet_notifications.h" 5 #include "chrome/browser/printing/cloud_print/privet_notifications.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 &mock_delegate_)); 96 &mock_delegate_));
97 97
98 description_.name = kExampleDeviceHumanName; 98 description_.name = kExampleDeviceHumanName;
99 description_.description = kExampleDeviceDescription; 99 description_.description = kExampleDeviceDescription;
100 } 100 }
101 101
102 virtual ~PrivetNotificationsListenerTest() {} 102 virtual ~PrivetNotificationsListenerTest() {}
103 103
104 bool SuccessfulResponseToInfo(const std::string& response) { 104 bool SuccessfulResponseToInfo(const std::string& response) {
105 net::TestURLFetcher* fetcher = fetcher_factory_.GetFetcherByID(0); 105 net::TestURLFetcher* fetcher = fetcher_factory_.GetFetcherByID(0);
106 if (!fetcher || GURL(kDeviceInfoURL) != fetcher->GetOriginalURL()) 106 if (!fetcher || fetcher->GetOriginalURL() != kDeviceInfoURL)
107 return false; 107 return false;
108 108
109 fetcher->SetResponseString(response); 109 fetcher->SetResponseString(response);
110 fetcher->set_status( 110 fetcher->set_status(
111 net::URLRequestStatus(net::URLRequestStatus::SUCCESS, net::OK)); 111 net::URLRequestStatus(net::URLRequestStatus::SUCCESS, net::OK));
112 fetcher->set_response_code(200); 112 fetcher->set_response_code(200);
113 fetcher->delegate()->OnURLFetchComplete(fetcher); 113 fetcher->delegate()->OnURLFetchComplete(fetcher);
114 return true; 114 return true;
115 } 115 }
116 116
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 EXPECT_EQ("", service.open_tab_url().spec()); 311 EXPECT_EQ("", service.open_tab_url().spec());
312 EXPECT_EQ(0U, service.open_tab_count()); 312 EXPECT_EQ(0U, service.open_tab_count());
313 EXPECT_EQ(1U, service.disable_notifications_count()); 313 EXPECT_EQ(1U, service.disable_notifications_count());
314 EXPECT_EQ(0U, ui_manager()->GetNotificationCount()); 314 EXPECT_EQ(0U, ui_manager()->GetNotificationCount());
315 } 315 }
316 316
317 } // namespace 317 } // namespace
318 318
319 } // namespace cloud_print 319 } // namespace cloud_print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698