Index: chrome/browser/ui/webui/options/options_browsertest.js |
diff --git a/chrome/browser/ui/webui/options/options_browsertest.js b/chrome/browser/ui/webui/options/options_browsertest.js |
index 591771f0972cec2b4d78f944ee7846d293605575..078c4c318052dd34ea1be7e34e4d4985e70556ee 100644 |
--- a/chrome/browser/ui/webui/options/options_browsertest.js |
+++ b/chrome/browser/ui/webui/options/options_browsertest.js |
@@ -636,6 +636,21 @@ TEST_F('OptionsWebUIExtendedTest', 'CloseOverlay', function() { |
}); |
}); |
+// Test that closing an overlay that did not push history when opening does not |
+// again push history. |
+TEST_F('OptionsWebUIExtendedTest', 'CloseOverlayNoHistory', function() { |
+ // Open the do not track confirmation prompt. |
+ OptionsPage.showPageByName('doNotTrackConfirm', false); |
+ |
+ // Opening the prompt does not add to the history. |
+ this.verifyHistory_([''], function() { |
+ // Close the overlay. |
+ OptionsPage.closeOverlay(); |
+ // Still no history changes. |
+ this.verifyHistory_([''], testDone); |
+ }.bind(this)); |
+}); |
+ |
// Make sure an overlay isn't closed (even temporarily) when another overlay is |
// opened on top. |
TEST_F('OptionsWebUIExtendedTest', 'OverlayAboveNoReset', function() { |