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

Unified Diff: components/offline_pages/background/request_coordinator_unittest.cc

Issue 2433283003: [Offline Page] Fix test failure on svelte devices. (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/background/request_coordinator_unittest.cc
diff --git a/components/offline_pages/background/request_coordinator_unittest.cc b/components/offline_pages/background/request_coordinator_unittest.cc
index 52d442c5c520164747e36414f44336f820127ca9..0cfd54b476e58847e04495004bb839e1e5a6a980 100644
--- a/components/offline_pages/background/request_coordinator_unittest.cc
+++ b/components/offline_pages/background/request_coordinator_unittest.cc
@@ -523,7 +523,13 @@ TEST_F(RequestCoordinatorTest, SavePageLaterFailed) {
// Wait for callbacks to finish, both request queue and offliner.
PumpLoop();
// Will not be called since the offliner is disabled.
- EXPECT_FALSE(immediate_schedule_callback_called());
+ // On low-end devices the callback will be called with false since the
+ // processing started but failed due to svelte devices.
+ if (base::SysInfo::IsLowEndDevice()) {
+ EXPECT_TRUE(immediate_schedule_callback_called());
+ } else {
+ EXPECT_FALSE(immediate_schedule_callback_called());
+ }
// Check the request queue is as expected.
EXPECT_EQ(1UL, last_requests().size());
« no previous file with comments | « components/offline_pages/background/request_coordinator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698