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

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

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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/webui/inspect_ui_browsertest.cc ('k') | chrome/browser/unload_browsertest.cc » ('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 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/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 11 matching lines...) Expand all
22 void SetUpOnMainThread() override { 22 void SetUpOnMainThread() override {
23 WebUIBrowserTest::SetUpOnMainThread(); 23 WebUIBrowserTest::SetUpOnMainThread();
24 AddLibrary( 24 AddLibrary(
25 base::FilePath(FILE_PATH_LITERAL("webview_content_script_test.js"))); 25 base::FilePath(FILE_PATH_LITERAL("webview_content_script_test.js")));
26 AddLibrary( 26 AddLibrary(
27 base::FilePath(FILE_PATH_LITERAL("webview_basic.js"))); 27 base::FilePath(FILE_PATH_LITERAL("webview_basic.js")));
28 28
29 base::FilePath test_data_dir; 29 base::FilePath test_data_dir;
30 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); 30 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir);
31 embedded_test_server()->ServeFilesFromDirectory(test_data_dir); 31 embedded_test_server()->ServeFilesFromDirectory(test_data_dir);
32 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 32 ASSERT_TRUE(embedded_test_server()->Start());
33 } 33 }
34 34
35 GURL GetTestUrl(const std::string& path) const { 35 GURL GetTestUrl(const std::string& path) const {
36 return embedded_test_server()->base_url().Resolve(path); 36 return embedded_test_server()->base_url().Resolve(path);
37 } 37 }
38 38
39 GURL GetWebViewEnabledWebUIURL() const { 39 GURL GetWebViewEnabledWebUIURL() const {
40 return GURL(chrome::kChromeUIChromeSigninURL); 40 return GURL(chrome::kChromeUIChromeSigninURL);
41 } 41 }
42 42
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 #endif 167 #endif
168 168
169 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) { 169 IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, ContextMenuInspectElement) {
170 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL()); 170 ui_test_utils::NavigateToURL(browser(), GetWebViewEnabledWebUIURL());
171 content::ContextMenuParams params; 171 content::ContextMenuParams params;
172 TestRenderViewContextMenu menu( 172 TestRenderViewContextMenu menu(
173 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(), 173 browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(),
174 params); 174 params);
175 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT)); 175 EXPECT_FALSE(menu.IsItemPresent(IDC_CONTENT_CONTEXT_INSPECTELEMENT));
176 } 176 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/inspect_ui_browsertest.cc ('k') | chrome/browser/unload_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698