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

Unified Diff: chrome/browser/child_process_security_policy_browsertest.cc

Issue 6538100: Move core pieces of chrome\browser. I've only gone up to "g", will do the re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: take out extra stuff from content_browser.gypi Created 9 years, 10 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
Index: chrome/browser/child_process_security_policy_browsertest.cc
===================================================================
--- chrome/browser/child_process_security_policy_browsertest.cc (revision 75626)
+++ chrome/browser/child_process_security_policy_browsertest.cc (working copy)
@@ -1,52 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/file_path.h"
-#include "base/process_util.h"
-#include "chrome/browser/child_process_security_policy.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/common/result_codes.h"
-#include "chrome/test/in_process_browser_test.h"
-#include "chrome/test/ui_test_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class ChildProcessSecurityPolicyInProcessBrowserTest
- : public InProcessBrowserTest {
- public:
- virtual void SetUp() {
- EXPECT_EQ(
- ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 0U);
- InProcessBrowserTest::SetUp();
- }
-
- virtual void TearDown() {
- EXPECT_EQ(
- ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 0U);
- InProcessBrowserTest::TearDown();
- }
-};
-
-IN_PROC_BROWSER_TEST_F(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak) {
- const FilePath kTestDir(FILE_PATH_LITERAL("google"));
- const FilePath kTestFile(FILE_PATH_LITERAL("google.html"));
- GURL url(ui_test_utils::GetTestUrl(kTestDir, kTestFile));
-
- ui_test_utils::NavigateToURL(browser(), url);
- EXPECT_EQ(
- ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U);
-
- TabContents* tab = browser()->GetTabContentsAt(0);
- ASSERT_TRUE(tab != NULL);
- base::KillProcess(tab->GetRenderProcessHost()->GetHandle(),
- ResultCodes::KILLED, true);
-
- tab->controller().Reload(true);
- EXPECT_EQ(
- ChildProcessSecurityPolicy::GetInstance()->security_state_.size(), 1U);
-}
« no previous file with comments | « chrome/browser/child_process_security_policy.cc ('k') | chrome/browser/child_process_security_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698