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

Unified Diff: chrome/browser/chrome_site_per_process_browsertest.cc

Issue 1502963004: Use content::NavigateIframeToURL in ProcessManagerBrowserTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove paranoid onload check Created 5 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
« no previous file with comments | « no previous file | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_site_per_process_browsertest.cc
diff --git a/chrome/browser/chrome_site_per_process_browsertest.cc b/chrome/browser/chrome_site_per_process_browsertest.cc
index 11e2c848c7b219674dbfc483d5b3c9e704c080c8..f52c295ad0c850993cdfe1ecc4c823871a2e5724 100644
--- a/chrome/browser/chrome_site_per_process_browsertest.cc
+++ b/chrome/browser/chrome_site_per_process_browsertest.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/files/file_path.h"
+#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -102,21 +104,22 @@ IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest,
// involves querying content settings from the renderer process and using the
// top frame's origin as one of the parameters. See https://crbug.com/426658.
IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessTest, PluginWithRemoteTopFrame) {
- GURL main_url(embedded_test_server()->GetURL("a.com", "/iframe.html"));
+ // Serve from the root so that flash_object.html can load the swf file.
+ base::FilePath test_data_dir;
+ CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir));
+ embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
+
+ GURL main_url(
+ embedded_test_server()->GetURL("a.com", "/chrome/test/data/iframe.html"));
ui_test_utils::NavigateToURL(browser(), main_url);
// Navigate subframe to a page with a Flash object.
content::WebContents* active_web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
GURL frame_url =
- embedded_test_server()->GetURL("b.com", "/flash_object.html");
- content::DOMMessageQueue msg_queue;
- EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url));
+ embedded_test_server()->GetURL("b.com",
+ "/chrome/test/data/flash_object.html");
// Ensure the page finishes loading without crashing.
- std::string status;
- while (msg_queue.WaitForMessage(&status)) {
- if (status == "\"DONE\"")
- break;
- }
+ EXPECT_TRUE(NavigateIframeToURL(active_web_contents, "test", frame_url));
}
« no previous file with comments | « no previous file | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698