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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <string> 5 #include <string>
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 24 matching lines...) Expand all
35 #define MAYBE_BackForwardDoesntCrash DISABLED_BackForwardDoesntCrash 35 #define MAYBE_BackForwardDoesntCrash DISABLED_BackForwardDoesntCrash
36 #else 36 #else
37 #define MAYBE_BackForwardDoesntCrash BackForwardDoesntCrash 37 #define MAYBE_BackForwardDoesntCrash BackForwardDoesntCrash
38 #endif 38 #endif
39 39
40 IN_PROC_BROWSER_TEST_F(MdSettingsUITest, MAYBE_BackForwardDoesntCrash) { 40 IN_PROC_BROWSER_TEST_F(MdSettingsUITest, MAYBE_BackForwardDoesntCrash) {
41 NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL)); 41 NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL));
42 42
43 NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL)); 43 NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
44 44
45 chrome::GoBack(browser(), CURRENT_TAB); 45 chrome::GoBack(browser(), WindowOpenDisposition::CURRENT_TAB);
46 WaitForLoadStop(browser()->tab_strip_model()->GetActiveWebContents()); 46 WaitForLoadStop(browser()->tab_strip_model()->GetActiveWebContents());
47 } 47 }
48 48
49 // Catch lifetime issues in message handlers. There was previously a problem 49 // Catch lifetime issues in message handlers. There was previously a problem
50 // with PrefMember calling Init again after Destroy. 50 // with PrefMember calling Init again after Destroy.
51 IN_PROC_BROWSER_TEST_F(MdSettingsUITest, ToggleJavaScript) { 51 IN_PROC_BROWSER_TEST_F(MdSettingsUITest, ToggleJavaScript) {
52 NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL)); 52 NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL));
53 53
54 const auto& handlers = *browser() 54 const auto& handlers = *browser()
55 ->tab_strip_model() 55 ->tab_strip_model()
56 ->GetActiveWebContents() 56 ->GetActiveWebContents()
57 ->GetWebUI() 57 ->GetWebUI()
58 ->GetHandlersForTesting(); 58 ->GetHandlersForTesting();
59 59
60 for (content::WebUIMessageHandler* handler : handlers) { 60 for (content::WebUIMessageHandler* handler : handlers) {
61 handler->AllowJavascriptForTesting(); 61 handler->AllowJavascriptForTesting();
62 handler->DisallowJavascript(); 62 handler->DisallowJavascript();
63 handler->AllowJavascriptForTesting(); 63 handler->AllowJavascriptForTesting();
64 } 64 }
65 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | chrome/browser/ui/webui/settings_utils_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698