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

Side by Side Diff: content/browser/background_sync/background_sync_browsertest.cc

Issue 1960843002: [OnionSoup] Move background_sync.mojom from //content to //third_party/WebKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng@'s comment Created 4 years, 7 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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/background_sync/background_sync_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 void RegistrationPendingDidGetSyncRegistration( 71 void RegistrationPendingDidGetSyncRegistration(
72 const std::string& tag, 72 const std::string& tag,
73 const base::Callback<void(bool)>& callback, 73 const base::Callback<void(bool)>& callback,
74 BackgroundSyncStatus error_type, 74 BackgroundSyncStatus error_type,
75 std::unique_ptr<ScopedVector<BackgroundSyncRegistration>> registrations) { 75 std::unique_ptr<ScopedVector<BackgroundSyncRegistration>> registrations) {
76 ASSERT_EQ(BACKGROUND_SYNC_STATUS_OK, error_type); 76 ASSERT_EQ(BACKGROUND_SYNC_STATUS_OK, error_type);
77 // Find the right registration in the list and check its status. 77 // Find the right registration in the list and check its status.
78 for (const BackgroundSyncRegistration* registration : *registrations) { 78 for (const BackgroundSyncRegistration* registration : *registrations) {
79 if (registration->options()->tag == tag) { 79 if (registration->options()->tag == tag) {
80 callback.Run(registration->sync_state() == 80 callback.Run(registration->sync_state() ==
81 mojom::BackgroundSyncState::PENDING); 81 blink::mojom::BackgroundSyncState::PENDING);
82 return; 82 return;
83 } 83 }
84 } 84 }
85 ADD_FAILURE() << "Registration should exist"; 85 ADD_FAILURE() << "Registration should exist";
86 } 86 }
87 87
88 void RegistrationPendingDidGetSWRegistration( 88 void RegistrationPendingDidGetSWRegistration(
89 const scoped_refptr<BackgroundSyncContext> sync_context, 89 const scoped_refptr<BackgroundSyncContext> sync_context,
90 const std::string& tag, 90 const std::string& tag,
91 const base::Callback<void(bool)>& callback, 91 const base::Callback<void(bool)>& callback,
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 IN_PROC_BROWSER_TEST_F(BackgroundSyncBrowserTest, 680 IN_PROC_BROWSER_TEST_F(BackgroundSyncBrowserTest,
681 RegisterFromServiceWorkerWithoutMainFrameHost) { 681 RegisterFromServiceWorkerWithoutMainFrameHost) {
682 std::string script_result; 682 std::string script_result;
683 EXPECT_TRUE( 683 EXPECT_TRUE(
684 RegisterFromCrossOriginFrame(kRegisterSyncFromSWURL, &script_result)); 684 RegisterFromCrossOriginFrame(kRegisterSyncFromSWURL, &script_result));
685 EXPECT_EQ(BuildExpectedResult("frame", "failed to register sync"), 685 EXPECT_EQ(BuildExpectedResult("frame", "failed to register sync"),
686 script_result); 686 script_result);
687 } 687 }
688 688
689 } // namespace content 689 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/background_sync/background_sync_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698