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

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

Issue 2082563002: Revert of MD Settings: ... and we fixed all CHECK()-based URL crashes once and for all. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/webui/settings/md_settings_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model.h"
10 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
11 #include "chrome/test/base/in_process_browser_test.h" 8 #include "chrome/test/base/in_process_browser_test.h"
12 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/common/url_constants.h" 10 #include "content/public/common/url_constants.h"
14 #include "content/public/test/browser_test_utils.h"
15 #include "ui/base/window_open_disposition.h"
16 #include "url/gurl.h" 11 #include "url/gurl.h"
17 12
18 typedef InProcessBrowserTest MdSettingsBrowserTest; 13 typedef InProcessBrowserTest MdSettingsBrowserTest;
19 14
20 using ui_test_utils::NavigateToURL;
21 using content::WaitForLoadStop;
22
23 IN_PROC_BROWSER_TEST_F(MdSettingsBrowserTest, ViewSourceDoesntCrash) { 15 IN_PROC_BROWSER_TEST_F(MdSettingsBrowserTest, ViewSourceDoesntCrash) {
24 NavigateToURL(browser(), 16 ui_test_utils::NavigateToURL(browser(),
25 GURL(content::kViewSourceScheme + std::string(":") + 17 GURL(content::kViewSourceScheme + std::string(":") +
26 chrome::kChromeUIMdSettingsURL)); 18 chrome::kChromeUIMdSettingsURL));
27 } 19 }
28
29 IN_PROC_BROWSER_TEST_F(MdSettingsBrowserTest, BackForwardDoesntCrash) {
30 NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL));
31
32 NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
33
34 chrome::GoBack(browser(), CURRENT_TAB);
35 WaitForLoadStop(browser()->tab_strip_model()->GetActiveWebContents());
36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698