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

Unified Diff: chrome/browser/extensions/process_management_browsertest.cc

Issue 2554083002: Change Isolate Extensions to be off by default. (Closed)
Patch Set: Created 4 years 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
Index: chrome/browser/extensions/process_management_browsertest.cc
diff --git a/chrome/browser/extensions/process_management_browsertest.cc b/chrome/browser/extensions/process_management_browsertest.cc
index 4adbd2f7142bc14a018437a7b2c5ad1a935b5bf0..012fb553d0cf27c65aba7a9f90c980fe9cedae4e 100644
--- a/chrome/browser/extensions/process_management_browsertest.cc
+++ b/chrome/browser/extensions/process_management_browsertest.cc
@@ -361,9 +361,21 @@ IN_PROC_BROWSER_TEST_F(ChromeWebStoreProcessTest,
// Store gallery URL (which will commit into a chrome-extension://cws-app-id).
bool ignored_script_result = false;
content::TestNavigationObserver nav_observer(web_contents, 1);
+ content::RenderProcessHostWatcher crash_observer(
+ web_contents->GetMainFrame()->GetProcess(),
+ content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
+
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
web_contents, navigation_starting_script, &ignored_script_result));
+ // When --isolate-extensions is enabled, the expectation is that the store
+ // will be properly put in its own process, otherwise the renderer process
+ // is going to be terminated.
+ if (!extensions::IsIsolateExtensionsEnabled()) {
+ crash_observer.Wait();
+ return;
+ }
+
// Verify that the navigation succeeded.
nav_observer.Wait();
EXPECT_EQ(cws_web_url, web_contents->GetLastCommittedURL());
@@ -376,6 +388,5 @@ IN_PROC_BROWSER_TEST_F(ChromeWebStoreProcessTest,
extensions::kWebStoreAppId, new_process_host->GetID()));
// Verify that Chrome Web Store is isolated in a separate renderer process.
- if (extensions::IsIsolateExtensionsEnabled())
- EXPECT_NE(old_process_host, new_process_host);
+ EXPECT_NE(old_process_host, new_process_host);
}
« no previous file with comments | « chrome/browser/chrome_security_exploit_browsertest.cc ('k') | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698