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

Unified Diff: chrome/browser/renderer_host/render_view_host_manager_browsertest.cc

Issue 132009: fix DOMUI pages after install of .crx (Closed)
Patch Set: touch grd to avoid clobber build Created 11 years, 6 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/renderer_host/render_view_host_manager_browsertest.cc
diff --git a/chrome/browser/renderer_host/render_view_host_manager_browsertest.cc b/chrome/browser/renderer_host/render_view_host_manager_browsertest.cc
new file mode 100755
index 0000000000000000000000000000000000000000..a0fb805ab917e8b9f3d0a27460d50c7d4f3ee179
--- /dev/null
+++ b/chrome/browser/renderer_host/render_view_host_manager_browsertest.cc
@@ -0,0 +1,47 @@
+// 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 "chrome/browser/browser.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/extension_error_reporter.h"
+#include "chrome/test/in_process_browser_test.h"
+#include "chrome/test/ui_test_utils.h"
+#include "net/base/net_util.h"
+
+class RenderViewHostManagerTest : public InProcessBrowserTest {
+ public:
+ RenderViewHostManagerTest() {
+ EnableDOMAutomation();
+ }
+ virtual void SetUpCommandLine(CommandLine* command_line) {
+ command_line->AppendSwitch(switches::kEnableExtensions);
+ }
+};
+
+// Test for crbug.com/14505. This tests that chrome:// urls are still functional
+// after download of a file while viewing another chrome://.
+IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, ChromeURLAfterDownload) {
+ GURL downloads_url("chrome://downloads");
+ GURL extensions_url("chrome://extensions");
+ FilePath zip_download;
+ ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &zip_download));
+ zip_download = zip_download.AppendASCII("zip").AppendASCII("test.zip");
+ GURL zip_url = net::FilePathToFileURL(zip_download);
+
+ ui_test_utils::NavigateToURL(browser(), downloads_url);
+ ui_test_utils::NavigateToURL(browser(), zip_url);
+ ui_test_utils::NavigateToURL(browser(), extensions_url);
+
+ TabContents *contents = browser()->GetSelectedTabContents();
+ ASSERT_TRUE(contents);
+ bool domui_responded = false;
+ EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ contents,
+ L"",
+ L"window.domAutomationController.send(window.domui_responded_);",
+ &domui_responded));
+ EXPECT_TRUE(domui_responded);
+}
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_manager.cc ('k') | chrome/browser/resources/extensions_ui.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698