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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_browsertest.cc

Issue 162083002: Fix and re-enable NoScriptAccessAfterSwapOut test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/test/data/click-noreferrer-links.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <set> 5 #include <set>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 std::string* replacement_path) { 43 std::string* replacement_path) {
44 std::vector<net::SpawnedTestServer::StringPair> replacement_text; 44 std::vector<net::SpawnedTestServer::StringPair> replacement_text;
45 replacement_text.push_back( 45 replacement_text.push_back(
46 make_pair("REPLACE_WITH_HOST_AND_PORT", host_port_pair.ToString())); 46 make_pair("REPLACE_WITH_HOST_AND_PORT", host_port_pair.ToString()));
47 return net::SpawnedTestServer::GetFilePathWithReplacements( 47 return net::SpawnedTestServer::GetFilePathWithReplacements(
48 original_file_path, replacement_text, replacement_path); 48 original_file_path, replacement_text, replacement_path);
49 } 49 }
50 }; 50 };
51 51
52 // Web pages should not have script access to the swapped out page. 52 // Web pages should not have script access to the swapped out page.
53 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, 53 IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, NoScriptAccessAfterSwapOut) {
54 DISABLED_NoScriptAccessAfterSwapOut) {
55 // Start two servers with different sites. 54 // Start two servers with different sites.
56 ASSERT_TRUE(test_server()->Start()); 55 ASSERT_TRUE(test_server()->Start());
57 net::SpawnedTestServer https_server( 56 net::SpawnedTestServer https_server(
58 net::SpawnedTestServer::TYPE_HTTPS, 57 net::SpawnedTestServer::TYPE_HTTPS,
59 net::SpawnedTestServer::kLocalhost, 58 net::SpawnedTestServer::kLocalhost,
60 base::FilePath(FILE_PATH_LITERAL("content/test/data"))); 59 base::FilePath(FILE_PATH_LITERAL("content/test/data")));
61 ASSERT_TRUE(https_server.Start()); 60 ASSERT_TRUE(https_server.Start());
62 61
63 // Load a page with links that open in a new window. 62 // Load a page with links that open in a new window.
64 std::string replacement_path; 63 std::string replacement_path;
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 shell()->web_contents()->GetBrowserContext(), GURL(), NULL, 1414 shell()->web_contents()->GetBrowserContext(), GURL(), NULL,
1416 MSG_ROUTING_NONE, gfx::Size()); 1415 MSG_ROUTING_NONE, gfx::Size());
1417 RenderProcessHostWatcher crash_observer2( 1416 RenderProcessHostWatcher crash_observer2(
1418 shell2->web_contents(), 1417 shell2->web_contents(),
1419 RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 1418 RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
1420 NavigateToURL(shell2, GURL(kChromeUIKillURL)); 1419 NavigateToURL(shell2, GURL(kChromeUIKillURL));
1421 crash_observer2.Wait(); 1420 crash_observer2.Wait();
1422 } 1421 }
1423 1422
1424 } // namespace content 1423 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/click-noreferrer-links.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698