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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc

Issue 2535023002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (Closed)
Patch Set: Fixing a previews test Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/offline_pages/offline_page_utils.h" 5 #include "chrome/browser/android/offline_pages/offline_page_utils.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // This one should be missing 255 // This one should be missing
256 OfflinePageUtils::CheckExistenceOfRequestsWithURL( 256 OfflinePageUtils::CheckExistenceOfRequestsWithURL(
257 profile(), kDownloadNamespace, kTestPage1Url, 257 profile(), kDownloadNamespace, kTestPage1Url,
258 base::Bind(&HasDuplicatesCallback, base::Unretained(&has_duplicates), 258 base::Bind(&HasDuplicatesCallback, base::Unretained(&has_duplicates),
259 base::Unretained(&latest_saved_time))); 259 base::Unretained(&latest_saved_time)));
260 RunUntilIdle(); 260 RunUntilIdle();
261 EXPECT_FALSE(has_duplicates); 261 EXPECT_FALSE(has_duplicates);
262 EXPECT_TRUE(latest_saved_time.is_null()); 262 EXPECT_TRUE(latest_saved_time.is_null());
263 } 263 }
264 264
265 TEST_F(OfflinePageUtilsTest, EqualsIgnoringFragment) {
266 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
267 GURL("http://example.com/"), GURL("http://example.com/")));
268 EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
jianli 2016/11/28 22:18:56 Please add more coverage like the followings: EX
fgorski 2016/11/28 23:14:50 Done.
269 GURL("http://example.com/"), GURL("http://example.com/#test")));
270 EXPECT_FALSE(OfflinePageUtils::EqualsIgnoringFragment(
271 GURL("http://example.com/"), GURL("http://test.com/#test")));
272 }
273
265 } // namespace offline_pages 274 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698