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

Side by Side Diff: components/offline_pages/background/request_coordinator_unittest.cc

Issue 2486653003: Disable RequestCoordinatorTest.PauseAndResumeObserver on IOS (Closed)
Patch Set: . 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/offline_pages/background/request_coordinator.h" 5 #include "components/offline_pages/background/request_coordinator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 // Wait for async get to finish. 1250 // Wait for async get to finish.
1251 WaitForCallback(); 1251 WaitForCallback();
1252 PumpLoop(); 1252 PumpLoop();
1253 1253
1254 // Check that the statuses found in the callback match what we expect. 1254 // Check that the statuses found in the callback match what we expect.
1255 EXPECT_EQ(2UL, last_requests().size()); 1255 EXPECT_EQ(2UL, last_requests().size());
1256 EXPECT_EQ(kRequestId1, last_requests().at(0)->request_id()); 1256 EXPECT_EQ(kRequestId1, last_requests().at(0)->request_id());
1257 EXPECT_EQ(kRequestId2, last_requests().at(1)->request_id()); 1257 EXPECT_EQ(kRequestId2, last_requests().at(1)->request_id());
1258 } 1258 }
1259 1259
1260 TEST_F(RequestCoordinatorTest, PauseAndResumeObserver) { 1260 #if defined(OS_IOS)
1261 // Flaky on IOS. http://crbug/663311
1262 #define MAYBE_PauseAndResumeObserver DISABLED_PauseAndResumeObserver
1263 #else
1264 #define MAYBE_PauseAndResumeObserver PauseAndResumeObserver
1265 #endif
1266 TEST_F(RequestCoordinatorTest, MAYBE_PauseAndResumeObserver) {
1261 // Add a request to the queue. 1267 // Add a request to the queue.
1262 offline_pages::SavePageRequest request1(kRequestId1, kUrl1, kClientId1, 1268 offline_pages::SavePageRequest request1(kRequestId1, kUrl1, kClientId1,
1263 base::Time::Now(), kUserRequested); 1269 base::Time::Now(), kUserRequested);
1264 coordinator()->queue()->AddRequest( 1270 coordinator()->queue()->AddRequest(
1265 request1, base::Bind(&RequestCoordinatorTest::AddRequestDone, 1271 request1, base::Bind(&RequestCoordinatorTest::AddRequestDone,
1266 base::Unretained(this))); 1272 base::Unretained(this)));
1267 PumpLoop(); 1273 PumpLoop();
1268 1274
1269 // Pause the request. 1275 // Pause the request.
1270 std::vector<int64_t> request_ids; 1276 std::vector<int64_t> request_ids;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 // Now whether processing triggered immediately depends on whether test 1401 // Now whether processing triggered immediately depends on whether test
1396 // is run on svelte device or not. 1402 // is run on svelte device or not.
1397 if (base::SysInfo::IsLowEndDevice()) { 1403 if (base::SysInfo::IsLowEndDevice()) {
1398 EXPECT_FALSE(is_busy()); 1404 EXPECT_FALSE(is_busy());
1399 } else { 1405 } else {
1400 EXPECT_TRUE(is_busy()); 1406 EXPECT_TRUE(is_busy());
1401 } 1407 }
1402 } 1408 }
1403 1409
1404 } // namespace offline_pages 1410 } // namespace offline_pages
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698