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

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: Catch navigation error 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..3a65a39b03f7292fad4a14d04f0daf97a9edc045 100644
--- a/content/browser/service_worker/service_worker_client_utils.cc
+++ b/content/browser/service_worker/service_worker_client_utils.cc
@@ -59,11 +59,15 @@ class OpenURLObserver : public WebContentsObserver {
void DidFinishNavigation(NavigationHandle* navigation_handle) override {
DCHECK(web_contents());
- if (!navigation_handle->HasCommitted())
+ if (!navigation_handle->HasCommitted()) {
falken 2017/06/12 01:50:14 Add a comment like: // Return error.
leonhsl(Using Gerrit) 2017/06/12 07:18:13 Done.
+ RunCallback(ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE);
leonhsl(Using Gerrit) 2017/06/10 02:57:44 DidFinishNavigation() should definitely fire the c
falken 2017/06/12 01:50:14 According to HasCommitted() documentation, this al
leonhsl(Using Gerrit) 2017/06/12 07:18:12 I checked through but did not find any wpt tests a
falken 2017/06/12 07:27:26 Not sure if error pages should be clients. But we
return;
+ }
- if (navigation_handle->GetFrameTreeNodeId() != frame_tree_node_id_)
+ if (navigation_handle->GetFrameTreeNodeId() != frame_tree_node_id_) {
falken 2017/06/12 01:50:14 // Return error.
leonhsl(Using Gerrit) 2017/06/12 07:18:12 Done.
+ 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