diff options
author | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 20:34:42 +0000 |
---|---|---|
committer | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 20:34:42 +0000 |
commit | 0d441b7a6a7e04a48951506dd1603a4180e940e0 (patch) | |
tree | 8c9aa844de066ec0ec387d05e2467937e1b705d7 /chrome/browser/chrome_content_browser_client_browsertest.cc | |
parent | e703426755e1548ffbb0dfffa7f48fa103e48968 (diff) | |
download | chromium_src-0d441b7a6a7e04a48951506dd1603a4180e940e0.zip chromium_src-0d441b7a6a7e04a48951506dd1603a4180e940e0.tar.gz chromium_src-0d441b7a6a7e04a48951506dd1603a4180e940e0.tar.bz2 |
Revert 157576 - Add reverse URL handler for shortening uber URLs
The previous patch failed UberURLHandler in browser_tests, therefore the reversion.
BUG=120493
TEST=Open the settings page. The address bar should show "chrome://settings". Click the "extensions" button on the left. The address bar should show "chrome://extensions". Click the "settings" button on the left, "show advanced settings", "content settings". The address bar should show "chrome://settings/content".
Review URL: https://chromiumcodereview.appspot.com/10780013
TBR=cem.kocagil@gmail.com
Review URL: https://codereview.chromium.org/10948041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_content_browser_client_browsertest.cc')
-rw-r--r-- | chrome/browser/chrome_content_browser_client_browsertest.cc | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/chrome/browser/chrome_content_browser_client_browsertest.cc b/chrome/browser/chrome_content_browser_client_browsertest.cc deleted file mode 100644 index b562838..0000000 --- a/chrome/browser/chrome_content_browser_client_browsertest.cc +++ /dev/null @@ -1,50 +0,0 @@ -// 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 <string> - -#include "chrome/test/base/in_process_browser_test.h" -#include "chrome/test/base/ui_test_utils.h" -#include "chrome/browser/ui/browser_tabstrip.h" -#include "chrome/browser/ui/tab_contents/tab_contents.h" -#include "content/public/browser/navigation_controller.h" -#include "content/public/browser/navigation_entry.h" -#include "content/public/browser/web_contents.h" -#include "googleurl/src/gurl.h" - -namespace content { - -class ChromeContentBrowserClientBrowserTest : public InProcessBrowserTest { - public: - // Returns the last committed navigation entry of the first tab. May be NULL - // if there is no such entry. - NavigationEntry* GetLastCommittedEntry() { - return chrome::GetTabContentsAt(browser(), 0)->web_contents() - ->GetController().GetLastCommittedEntry(); - } -}; - -IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, UberURLHandler) { - const GURL url1_short(std::string("chrome://settings/")); - const GURL url1_long(std::string("chrome://chrome/settings/")); - - const GURL url2_short(std::string("chrome://settings/content")); - const GURL url2_long(std::string("chrome://chrome/settings/content")); - - ui_test_utils::NavigateToURL(browser(), url1_short); - NavigationEntry* entry = GetLastCommittedEntry(); - - ASSERT_TRUE(entry != NULL); - EXPECT_EQ(url1_long, entry->GetURL()); - EXPECT_EQ(url1_short, entry->GetVirtualURL()); - - ui_test_utils::NavigateToURL(browser(), url2_short); - entry = GetLastCommittedEntry(); - - ASSERT_TRUE(entry != NULL); - EXPECT_EQ(url2_long, entry->GetURL()); - EXPECT_EQ(url2_short, entry->GetVirtualURL()); -} - -} // namespace content |