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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc

Issue 2083603003: Re-land MD Settings fix for crash on back/forward navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sanity check 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc b/chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc
index 3407bfe037b8de2cda106cfbb1e5346491e8d861..341664624f18879cc2a130e65a9913c0cfc17615 100644
--- a/chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc
@@ -4,16 +4,41 @@
#include <string>
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/common/url_constants.h"
+#include "content/public/test/browser_test_utils.h"
+#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
typedef InProcessBrowserTest MdSettingsBrowserTest;
+using ui_test_utils::NavigateToURL;
+using content::WaitForLoadStop;
+
IN_PROC_BROWSER_TEST_F(MdSettingsBrowserTest, ViewSourceDoesntCrash) {
- ui_test_utils::NavigateToURL(browser(),
+ NavigateToURL(browser(),
GURL(content::kViewSourceScheme + std::string(":") +
chrome::kChromeUIMdSettingsURL));
}
+
+// May not complete on memory bots. TODO(dbeam): investigate and fix.
+// See https://crbug.com/558434 and https://crbug.com/620370.
+#if defined(MEMORY_SANITIZER)
+#define MAYBE_BackForwardDoesntCrash DISABLED_BackForwardDoesntCrash
+#else
+#define MAYBE_BackForwardDoesntCrash BackForwardDoesntCrash
+#endif
+
+IN_PROC_BROWSER_TEST_F(MdSettingsBrowserTest, MAYBE_BackForwardDoesntCrash) {
+ NavigateToURL(browser(), GURL(chrome::kChromeUIMdSettingsURL));
+
+ NavigateToURL(browser(), GURL(chrome::kChromeUINewTabURL));
+
+ chrome::GoBack(browser(), CURRENT_TAB);
+ WaitForLoadStop(browser()->tab_strip_model()->GetActiveWebContents());
+}
« 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