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

Side by Side Diff: chrome/browser/extensions/process_management_browsertest.cc

Issue 2736863003: Test that no crash happens with the CWS error page.
Patch Set: Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // Verify that we really have the Chrome Web Store app loaded in the Web 383 // Verify that we really have the Chrome Web Store app loaded in the Web
384 // Contents. 384 // Contents.
385 content::RenderProcessHost* new_process_host = 385 content::RenderProcessHost* new_process_host =
386 web_contents->GetMainFrame()->GetProcess(); 386 web_contents->GetMainFrame()->GetProcess();
387 EXPECT_TRUE(extensions::ProcessMap::Get(profile())->Contains( 387 EXPECT_TRUE(extensions::ProcessMap::Get(profile())->Contains(
388 extensions::kWebStoreAppId, new_process_host->GetID())); 388 extensions::kWebStoreAppId, new_process_host->GetID()));
389 389
390 // Verify that Chrome Web Store is isolated in a separate renderer process. 390 // Verify that Chrome Web Store is isolated in a separate renderer process.
391 EXPECT_NE(old_process_host, new_process_host); 391 EXPECT_NE(old_process_host, new_process_host);
392 } 392 }
393
394 // This problem is similar to crbug.com/622385. It happens when an iframe error
nasko 2017/03/09 05:07:22 nit: https://crbug.com...
arthursonzogni 2017/03/09 15:40:52 Done.
395 // page with the Chrome Web Store URL is displayed and the iframe and the
396 // embedder reside in the same process. In this case, a renderer is killed with
nasko 2017/03/09 05:07:22 nit: s/embedder/parent document/, s/a renderer/the
arthursonzogni 2017/03/09 15:40:52 Done.
397 // the RFH_CAN_COMMIT_URL_BLOCKED IPC. This test asserts that no crash happens.
nasko 2017/03/09 05:07:22 RFH_CAN_COMMIT_URL_BLOCKED is not an IPC, but an e
arthursonzogni 2017/03/09 15:40:52 Done.
398 IN_PROC_BROWSER_TEST_F(ChromeWebStoreProcessTest,
399 ChromeWebStoreBlockedByFrameSrc) {
400 GURL url = embedded_test_server()->GetURL(
401 "/extensions/webstore_blocked_by_frame_src.html");
402 ui_test_utils::NavigateToURL(browser(), url);
nasko 2017/03/09 05:07:22 How does this test assert that there is no crash?
arthursonzogni 2017/03/09 15:40:52 Currently, there is no crash but a DCHECK I put a
403 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698