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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 740813004: Use StopChildProcess instead of base::KillProcess to kill a renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos Created 6 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 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 SetRestartDelayForForceInstalledAppsAndExtensionsForTesting(0); 1812 SetRestartDelayForForceInstalledAppsAndExtensionsForTesting(0);
1813 content::WindowedNotificationObserver extension_crashed_observer( 1813 content::WindowedNotificationObserver extension_crashed_observer(
1814 extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 1814 extensions::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
1815 content::NotificationService::AllSources()); 1815 content::NotificationService::AllSources());
1816 content::WindowedNotificationObserver extension_loaded_observer( 1816 content::WindowedNotificationObserver extension_loaded_observer(
1817 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 1817 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
1818 content::NotificationService::AllSources()); 1818 content::NotificationService::AllSources());
1819 extensions::ExtensionHost* extension_host = 1819 extensions::ExtensionHost* extension_host =
1820 extensions::ProcessManager::Get(browser()->profile()) 1820 extensions::ProcessManager::Get(browser()->profile())
1821 ->GetBackgroundHostForExtension(kGoodCrxId); 1821 ->GetBackgroundHostForExtension(kGoodCrxId);
1822 base::KillProcess(extension_host->render_process_host()->GetHandle(), 1822 extension_host->render_process_host()->FastShutdown(
1823 content::RESULT_CODE_KILLED, false); 1823 content::RESULT_CODE_KILLED, false);
1824 extension_crashed_observer.Wait(); 1824 extension_crashed_observer.Wait();
1825 extension_loaded_observer.Wait(); 1825 extension_loaded_observer.Wait();
1826 } 1826 }
1827 1827
1828 IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionRecommendedInstallationMode) { 1828 IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionRecommendedInstallationMode) {
1829 // Verifies that extensions that are recommended-installed by policies are 1829 // Verifies that extensions that are recommended-installed by policies are
1830 // installed, can be disabled but not uninstalled. 1830 // installed, can be disabled but not uninstalled.
1831 ExtensionService* service = extension_service(); 1831 ExtensionService* service = extension_service();
1832 ASSERT_FALSE(service->GetExtensionById(kGoodCrxId, true)); 1832 ASSERT_FALSE(service->GetExtensionById(kGoodCrxId, true));
1833 1833
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
3427 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 3427 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
3428 browser2->tab_strip_model()->GetActiveWebContents(), 3428 browser2->tab_strip_model()->GetActiveWebContents(),
3429 "domAutomationController.send(window.showModalDialog !== undefined);", 3429 "domAutomationController.send(window.showModalDialog !== undefined);",
3430 &result)); 3430 &result));
3431 EXPECT_TRUE(result); 3431 EXPECT_TRUE(result);
3432 } 3432 }
3433 3433
3434 #endif // !defined(CHROME_OS) 3434 #endif // !defined(CHROME_OS)
3435 3435
3436 } // namespace policy 3436 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698