Commit 41f1c15a authored by tfarina@chromium.org's avatar tfarina@chromium.org

content: Put test_url_constants.* into content namespace.

R=jam@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10778032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147374 0039d316-1c4b-4281-b951-d872f2087c98
parent f65a487e
......@@ -173,14 +173,14 @@ TEST_F(ChildProcessSecurityPolicyTest, AboutTest) {
EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("about:crash")));
// These requests for chrome:// pages should be granted.
p->GrantRequestURL(kRendererID, GURL(chrome::kTestNewTabURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestNewTabURL)));
p->GrantRequestURL(kRendererID, GURL(content::kTestNewTabURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(content::kTestNewTabURL)));
p->GrantRequestURL(kRendererID, GURL(chrome::kTestHistoryURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestHistoryURL)));
p->GrantRequestURL(kRendererID, GURL(content::kTestHistoryURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(content::kTestHistoryURL)));
p->GrantRequestURL(kRendererID, GURL(chrome::kTestBookmarksURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(chrome::kTestBookmarksURL)));
p->GrantRequestURL(kRendererID, GURL(content::kTestBookmarksURL));
EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL(content::kTestBookmarksURL)));
p->Remove(kRendererID);
}
......
......@@ -71,7 +71,7 @@ class RenderProcessHostTest : public InProcessBrowserTest {
content::RenderProcessHost* rph3 = NULL;
// Change the first tab to be the new tab page (TYPE_WEBUI).
GURL newtab(chrome::kTestNewTabURL);
GURL newtab(content::kTestNewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab);
EXPECT_EQ(tab_count, browser()->tab_count());
tab1 = chrome::GetWebContentsAt(browser(), tab_count - 1);
......@@ -109,7 +109,7 @@ class RenderProcessHostTest : public InProcessBrowserTest {
// Note: intentionally create this tab after the TYPE_TABBED tabs to
// exercise bug 43448 where extension and WebUI tabs could get combined into
// normal renderers.
GURL history(chrome::kTestHistoryURL);
GURL history(content::kTestHistoryURL);
chrome::ShowSingletonTab(browser(), history);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
......@@ -122,7 +122,7 @@ class RenderProcessHostTest : public InProcessBrowserTest {
// Create a TYPE_EXTENSION tab. It should be in its own process.
// (the bookmark manager is implemented as an extension)
GURL bookmarks(chrome::kTestBookmarksURL);
GURL bookmarks(content::kTestBookmarksURL);
chrome::ShowSingletonTab(browser(), bookmarks);
if (browser()->tab_count() == tab_count)
ui_test_utils::WaitForNewTab(browser());
......@@ -157,7 +157,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, ProcessPerTab) {
int host_count = 1;
// Change the first tab to be the new tab page (TYPE_WEBUI).
GURL newtab(chrome::kTestNewTabURL);
GURL newtab(content::kTestNewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab);
EXPECT_EQ(tab_count, browser()->tab_count());
EXPECT_EQ(host_count, RenderProcessHostCount());
......@@ -210,7 +210,7 @@ IN_PROC_BROWSER_TEST_F(RenderProcessHostTest, Backgrounding) {
parsed_command_line.AppendSwitch(switches::kProcessPerTab);
// Change the first tab to be the new tab page (TYPE_WEBUI).
GURL newtab(chrome::kTestNewTabURL);
GURL newtab(content::kTestNewTabURL);
ui_test_utils::NavigateToURL(browser(), newtab);
// Create a new tab. It should be foreground.
......
......@@ -459,7 +459,7 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
CrossSiteFailedRequest) {
// Visit another URL first to trigger a cross-site navigation.
GURL url(chrome::kTestNewTabURL);
GURL url(content::kTestNewTabURL);
ui_test_utils::NavigateToURL(browser(), url);
// Visit a URL that fails without calling ResourceDispatcherHost::Read.
......
......@@ -197,7 +197,7 @@ class RenderViewHostManagerTest
// a regression test for bug 9364.
TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
const GURL kNtpUrl(chrome::kTestNewTabURL);
const GURL kNtpUrl(content::kTestNewTabURL);
const GURL kDestUrl("http://www.google.com/");
// Navigate our first tab to the new tab page and then to the destination.
......@@ -262,7 +262,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// renderer in a stuck state. See http://crbug.com/93427.
TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) {
BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
const GURL kNtpUrl(chrome::kTestNewTabURL);
const GURL kNtpUrl(content::kTestNewTabURL);
const GURL kDestUrl("http://www.google.com/");
// Navigate our first tab to the new tab page and then to the destination.
......@@ -340,7 +340,7 @@ TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) {
// RenderView is being newly created or reused.
TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
const GURL kNtpUrl(chrome::kTestNewTabURL);
const GURL kNtpUrl(content::kTestNewTabURL);
const GURL kUrl("view-source:http://foo");
// We have to navigate to some page at first since without this, the first
......@@ -661,7 +661,7 @@ TEST_F(RenderViewHostManagerTest, WebUI) {
manager.Init(browser_context(), instance, MSG_ROUTING_NONE);
const GURL kUrl(chrome::kTestNewTabURL);
const GURL kUrl(content::kTestNewTabURL);
NavigationEntryImpl entry(NULL /* instance */, -1 /* page_id */, kUrl,
content::Referrer(), string16() /* title */,
content::PAGE_TRANSITION_TYPED,
......@@ -781,7 +781,7 @@ TEST_F(RenderViewHostManagerTest, NavigateAfterMissingSwapOutACK) {
TEST_F(RenderViewHostManagerTest, CreateSwappedOutOpenerRVHs) {
const GURL kUrl1("http://www.google.com/");
const GURL kUrl2("http://www.chromium.org/");
const GURL kNtpUrl(chrome::kTestNewTabURL);
const GURL kNtpUrl(content::kTestNewTabURL);
// Navigate to an initial URL.
contents()->NavigateAndCommit(kUrl1);
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 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 "content/common/test_url_constants.h"
namespace chrome {
namespace content {
const char kTestCacheURL[] = "about:cache";
const char kTestNewTabURL[] = "chrome://newtab";
const char kTestHistoryURL[] = "chrome://chrome/history/";
const char kTestBookmarksURL[] = "chrome://bookmarks/";
} // namespace chrome
} // namespace content
......@@ -2,14 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Contains constants for known URLs and portions thereof.
#ifndef CONTENT_COMMON_TEST_URL_CONSTANTS_H_
#define CONTENT_COMMON_TEST_URL_CONSTANTS_H_
#include "content/public/common/url_constants.h"
namespace chrome {
// Contains constants for known URLs and portions thereof.
namespace content {
// Various special URLs used for testing. They have the same values as the URLs
// in chrome/common/url_constants.h, but are duplicated here so that the reverse
......@@ -33,6 +30,6 @@ extern const char kTestHistoryURL[];
// not be the case.
extern const char kTestBookmarksURL[];
} // namespace chrome
} // namespace content
#endif // CONTENT_COMMON_TEST_URL_CONSTANTS_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment