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

Unified Diff: content/browser/service_worker/service_worker_client_utils.cc

Issue 2912593003: [ServiceWorker] Fix bugs of wpt tests for Client.navigate (Closed)
Patch Set: Address comments from falken@ Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_client_utils.cc
diff --git a/content/browser/service_worker/service_worker_client_utils.cc b/content/browser/service_worker/service_worker_client_utils.cc
index 487e85b24fd1b417b7d4542d3490c913cdfc52bc..3a9318b83fc8e4a9da24e702942d987cad5e93a3 100644
--- a/content/browser/service_worker/service_worker_client_utils.cc
+++ b/content/browser/service_worker/service_worker_client_utils.cc
@@ -59,11 +59,17 @@ class OpenURLObserver : public WebContentsObserver {
void DidFinishNavigation(NavigationHandle* navigation_handle) override {
DCHECK(web_contents());
- if (!navigation_handle->HasCommitted())
+ if (!navigation_handle->HasCommitted()) {
+ // Return error.
+ RunCallback(ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE);
return;
+ }
- if (navigation_handle->GetFrameTreeNodeId() != frame_tree_node_id_)
+ if (navigation_handle->GetFrameTreeNodeId() != frame_tree_node_id_) {
+ // Return error.
+ RunCallback(ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE);
return;
+ }
RenderFrameHost* render_frame_host =
navigation_handle->GetRenderFrameHost();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698