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

Side by Side Diff: content/browser/service_worker/service_worker_job_unittest.cc

Issue 2023243002: Remove base::Tuple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lint fix Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 #include <tuple>
6 7
7 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/run_loop.h" 11 #include "base/run_loop.h"
11 #include "content/browser/browser_thread_impl.h" 12 #include "content/browser/browser_thread_impl.h"
12 #include "content/browser/service_worker/embedded_worker_registry.h" 13 #include "content/browser/service_worker/embedded_worker_registry.h"
13 #include "content/browser/service_worker/embedded_worker_test_helper.h" 14 #include "content/browser/service_worker/embedded_worker_test_helper.h"
14 #include "content/browser/service_worker/service_worker_context_core.h" 15 #include "content/browser/service_worker/service_worker_context_core.h"
15 #include "content/browser/service_worker/service_worker_disk_cache.h" 16 #include "content/browser/service_worker/service_worker_disk_cache.h"
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 1585
1585 // The initial version should not pause after download. 1586 // The initial version should not pause after download.
1586 scoped_refptr<ServiceWorkerRegistration> registration = 1587 scoped_refptr<ServiceWorkerRegistration> registration =
1587 update_helper->SetupInitialRegistration(kNewVersionOrigin); 1588 update_helper->SetupInitialRegistration(kNewVersionOrigin);
1588 { 1589 {
1589 const IPC::Message* start_msg = 1590 const IPC::Message* start_msg =
1590 sink->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID); 1591 sink->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID);
1591 ASSERT_TRUE(start_msg); 1592 ASSERT_TRUE(start_msg);
1592 EmbeddedWorkerMsg_StartWorker::Param param; 1593 EmbeddedWorkerMsg_StartWorker::Param param;
1593 EmbeddedWorkerMsg_StartWorker::Read(start_msg, &param); 1594 EmbeddedWorkerMsg_StartWorker::Read(start_msg, &param);
1594 EmbeddedWorkerMsg_StartWorker_Params start_params = base::get<0>(param); 1595 EmbeddedWorkerMsg_StartWorker_Params start_params = std::get<0>(param);
1595 EXPECT_FALSE(start_params.pause_after_download); 1596 EXPECT_FALSE(start_params.pause_after_download);
1596 sink->ClearMessages(); 1597 sink->ClearMessages();
1597 } 1598 }
1598 1599
1599 // The updated version should pause after download. 1600 // The updated version should pause after download.
1600 registration->AddListener(update_helper); 1601 registration->AddListener(update_helper);
1601 registration->active_version()->StartUpdate(); 1602 registration->active_version()->StartUpdate();
1602 base::RunLoop().RunUntilIdle(); 1603 base::RunLoop().RunUntilIdle();
1603 { 1604 {
1604 const IPC::Message* start_msg = 1605 const IPC::Message* start_msg =
1605 sink->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID); 1606 sink->GetUniqueMessageMatching(EmbeddedWorkerMsg_StartWorker::ID);
1606 ASSERT_TRUE(start_msg); 1607 ASSERT_TRUE(start_msg);
1607 EmbeddedWorkerMsg_StartWorker::Param param; 1608 EmbeddedWorkerMsg_StartWorker::Param param;
1608 EmbeddedWorkerMsg_StartWorker::Read(start_msg, &param); 1609 EmbeddedWorkerMsg_StartWorker::Read(start_msg, &param);
1609 EmbeddedWorkerMsg_StartWorker_Params start_params = base::get<0>(param); 1610 EmbeddedWorkerMsg_StartWorker_Params start_params = std::get<0>(param);
1610 EXPECT_TRUE(start_params.pause_after_download); 1611 EXPECT_TRUE(start_params.pause_after_download);
1611 sink->ClearMessages(); 1612 sink->ClearMessages();
1612 } 1613 }
1613 } 1614 }
1614 1615
1615 } // namespace content 1616 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698