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

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

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell 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 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 crash_observer.Wait(); 1356 crash_observer.Wait();
1357 1357
1358 // Load the crash URL again but don't wait for any action. If it is not 1358 // Load the crash URL again but don't wait for any action. If it is not
1359 // ignored this time, we will fail the WebUI CHECK in InitRenderView. 1359 // ignored this time, we will fail the WebUI CHECK in InitRenderView.
1360 shell()->LoadURL(GURL(kChromeUICrashURL)); 1360 shell()->LoadURL(GURL(kChromeUICrashURL));
1361 1361
1362 // Ensure that such URLs can still work as the initial navigation of a tab. 1362 // Ensure that such URLs can still work as the initial navigation of a tab.
1363 // We postpone the initial navigation of the tab using an empty GURL, so that 1363 // We postpone the initial navigation of the tab using an empty GURL, so that
1364 // we can add a watcher for crashes. 1364 // we can add a watcher for crashes.
1365 Shell* shell2 = Shell::CreateNewWindow( 1365 Shell* shell2 = Shell::CreateNewWindow(
1366 shell()->web_contents()->GetBrowserContext(), GURL(), NULL, 1366 shell()->web_contents()->GetBrowserContext(), GURL(), NULL, gfx::Size());
1367 MSG_ROUTING_NONE, gfx::Size());
1368 RenderProcessHostWatcher crash_observer2( 1367 RenderProcessHostWatcher crash_observer2(
1369 shell2->web_contents(), 1368 shell2->web_contents(),
1370 RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); 1369 RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
1371 EXPECT_TRUE( 1370 EXPECT_TRUE(
1372 NavigateToURLAndExpectNoCommit(shell2, GURL(kChromeUIKillURL))); 1371 NavigateToURLAndExpectNoCommit(shell2, GURL(kChromeUIKillURL)));
1373 crash_observer2.Wait(); 1372 crash_observer2.Wait();
1374 } 1373 }
1375 1374
1376 // The test fails with Android ASAN with changes in v8 that seem unrelated. 1375 // The test fails with Android ASAN with changes in v8 that seem unrelated.
1377 // See http://crbug.com/428329. 1376 // See http://crbug.com/428329.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 EXPECT_TRUE(ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( 1589 EXPECT_TRUE(ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
1591 shell()->web_contents()->GetRenderProcessHost()->GetID(), file_path)); 1590 shell()->web_contents()->GetRenderProcessHost()->GetID(), file_path));
1592 1591
1593 // Navigate to a same site page to trigger a PageState update and ensure the 1592 // Navigate to a same site page to trigger a PageState update and ensure the
1594 // renderer is not killed. 1593 // renderer is not killed.
1595 EXPECT_TRUE( 1594 EXPECT_TRUE(
1596 NavigateToURL(shell(), test_server()->GetURL("files/title2.html"))); 1595 NavigateToURL(shell(), test_server()->GetURL("files/title2.html")));
1597 } 1596 }
1598 1597
1599 } // namespace content 1598 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698