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

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

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years 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
OLDNEW
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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" 8 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h"
9 #include "chrome/browser/signin/signin_promo.h"
9 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 11 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
12 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
13 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
14 #include "chrome/test/base/web_ui_browser_test.h" 15 #include "chrome/test/base/web_ui_browser_test.h"
15 #include "content/public/common/context_menu_params.h" 16 #include "content/public/common/context_menu_params.h"
16 #include "net/test/embedded_test_server/embedded_test_server.h" 17 #include "net/test/embedded_test_server/embedded_test_server.h"
17 18
18 class WebUIWebViewBrowserTest : public WebUIBrowserTest { 19 class WebUIWebViewBrowserTest : public WebUIBrowserTest {
(...skipping 11 matching lines...) Expand all
30 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); 31 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
31 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); 32 embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
32 ASSERT_TRUE(embedded_test_server()->Start()); 33 ASSERT_TRUE(embedded_test_server()->Start());
33 } 34 }
34 35
35 GURL GetTestUrl(const std::string& path) const { 36 GURL GetTestUrl(const std::string& path) const {
36 return embedded_test_server()->base_url().Resolve(path); 37 return embedded_test_server()->base_url().Resolve(path);
37 } 38 }
38 39
39 GURL GetWebViewEnabledWebUIURL() const { 40 GURL GetWebViewEnabledWebUIURL() const {
40 return GURL(chrome::kChromeUIChromeSigninURL); 41 return GURL(signin::GetPromoURL(
42 signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE,
43 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false));
41 } 44 }
42 45
43 private: 46 private:
44 DISALLOW_COPY_AND_ASSIGN(WebUIWebViewBrowserTest); 47 DISALLOW_COPY_AND_ASSIGN(WebUIWebViewBrowserTest);
45 }; 48 };
46 49
47 // Checks that hiding and showing the WebUI host page doesn't break guests in 50 // Checks that hiding and showing the WebUI host page doesn't break guests in
48 // it. 51 // it.
49 // Regression test for http://crbug.com/515268 52 // Regression test for http://crbug.com/515268
50 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DisplayNone) { 53 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DisplayNone) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 #endif 170 #endif
168 171
169 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) { 172 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) {
170 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); 173 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL());
171 content::ContextMenuParams params; 174 content::ContextMenuParams params;
172 TestRenderViewContextMenu menu( 175 TestRenderViewContextMenu menu(
173 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(), 176 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(),
174 params); 177 params);
175 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT)); 178 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
176 } 179 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_browsertest.js ('k') | chrome/browser/ui/zoom/zoom_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698