OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ui/webui/log_web_ui_url.h" | 5 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 117 } |
118 | 118 |
119 GURL extensions_frame_url(chrome::kChromeUIExtensionsFrameURL); | 119 GURL extensions_frame_url(chrome::kChromeUIExtensionsFrameURL); |
120 uint32_t extensions_frame_url_hash = base::Hash(extensions_frame_url.spec()); | 120 uint32_t extensions_frame_url_hash = base::Hash(extensions_frame_url.spec()); |
121 | 121 |
122 EXPECT_THAT(GetSamples(), ElementsAre(Bucket(extensions_frame_url_hash, 1), | 122 EXPECT_THAT(GetSamples(), ElementsAre(Bucket(extensions_frame_url_hash, 1), |
123 Bucket(history_frame_url_hash, 2), | 123 Bucket(history_frame_url_hash, 2), |
124 Bucket(uber_frame_url_hash, 2), | 124 Bucket(uber_frame_url_hash, 2), |
125 Bucket(uber_url_hash, 2))); | 125 Bucket(uber_url_hash, 2))); |
126 } | 126 } |
| 127 |
| 128 IN_PROC_BROWSER_TEST_F(LogWebUIUrlTest, TestExtensionsPage) { |
| 129 content::WebContents* tab = |
| 130 browser()->tab_strip_model()->GetActiveWebContents(); |
| 131 |
| 132 base::string16 extension_title = |
| 133 l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); |
| 134 |
| 135 { |
| 136 content::TitleWatcher title_watcher(tab, extension_title); |
| 137 ui_test_utils::NavigateToURL(browser(), |
| 138 GURL(chrome::kChromeUIExtensionsURL)); |
| 139 ASSERT_EQ(extension_title, title_watcher.WaitAndGetTitle()); |
| 140 } |
| 141 |
| 142 std::string scheme(content::kChromeUIScheme); |
| 143 GURL uber_url(scheme + "://" + chrome::kChromeUIUberHost); |
| 144 uint32_t uber_url_hash = base::Hash(uber_url.spec()); |
| 145 |
| 146 GURL uber_frame_url(chrome::kChromeUIUberFrameURL); |
| 147 uint32_t uber_frame_url_hash = base::Hash(uber_frame_url.spec()); |
| 148 |
| 149 GURL extensions_frame_url(chrome::kChromeUIExtensionsFrameURL); |
| 150 uint32_t extensions_frame_url_hash = base::Hash(extensions_frame_url.spec()); |
| 151 |
| 152 EXPECT_THAT(GetSamples(), ElementsAre(Bucket(extensions_frame_url_hash, 1), |
| 153 Bucket(uber_frame_url_hash, 1), |
| 154 Bucket(uber_url_hash, 1))); |
| 155 } |
127 #endif | 156 #endif |
128 | 157 |
129 } // namespace webui | 158 } // namespace webui |
OLD | NEW |