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

Side by Side Diff: chrome/browser/ui/webui/bookmarks_ui_browsertest.cc

Issue 2960143002: MD Bookmarks: Remove '/?id=1' from URL when displaying Bookmarks Bar (Closed)
Patch Set: Review comments Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/test/data/webui/md_bookmarks/router_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/test/test_timeouts.h" 5 #include "base/test/test_timeouts.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/chrome_pages.h" 8 #include "chrome/browser/ui/chrome_pages.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h" 10 #include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h"
(...skipping 27 matching lines...) Expand all
38 navigation_observer.Wait(); 38 navigation_observer.Wait();
39 } 39 }
40 40
41 void AssertIsBookmarksPage(content::WebContents* tab) { 41 void AssertIsBookmarksPage(content::WebContents* tab) {
42 GURL url; 42 GURL url;
43 std::string out; 43 std::string out;
44 44
45 if (MdBookmarksUI::IsEnabled()) { 45 if (MdBookmarksUI::IsEnabled()) {
46 ASSERT_TRUE(content::ExecuteScriptAndExtractString( 46 ASSERT_TRUE(content::ExecuteScriptAndExtractString(
47 tab, "domAutomationController.send(location.href)", &out)); 47 tab, "domAutomationController.send(location.href)", &out));
48 ASSERT_EQ("chrome://bookmarks/?id=1", out); 48 ASSERT_EQ("chrome://bookmarks/", out);
49 return; 49 return;
50 } 50 }
51 51
52 ASSERT_TRUE(content::ExecuteScriptAndExtractString( 52 ASSERT_TRUE(content::ExecuteScriptAndExtractString(
53 tab, 53 tab,
54 "domAutomationController.send(location.protocol)", 54 "domAutomationController.send(location.protocol)",
55 &out)); 55 &out));
56 ASSERT_EQ("chrome-extension:", out); 56 ASSERT_EQ("chrome-extension:", out);
57 ASSERT_TRUE(content::ExecuteScriptAndExtractString( 57 ASSERT_TRUE(content::ExecuteScriptAndExtractString(
58 tab, 58 tab,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 navigation_observer.Wait(); 111 navigation_observer.Wait();
112 112
113 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 113 ASSERT_EQ(1, browser()->tab_strip_model()->count());
114 } 114 }
115 115
116 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { 116 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) {
117 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); 117 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL));
118 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 118 ASSERT_EQ(1, browser()->tab_strip_model()->count());
119 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); 119 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents());
120 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/test/data/webui/md_bookmarks/router_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698