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

Unified Diff: chrome/browser/instant/instant_browsertest.cc

Issue 6677030: Fixes crash if instant is enabled and you block JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds test Created 9 years, 9 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 | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_browsertest.cc
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 1ecce317b1d7151bb5e1e9a8af818511ecbe64e1..26d400608054563fb747323f42f12555ba887591 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/autocomplete/autocomplete_edit_view.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_window.h"
+#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/instant/instant_loader.h"
#include "chrome/browser/instant/instant_loader_manager.h"
@@ -725,3 +726,17 @@ IN_PROC_BROWSER_TEST_F(InstantTest, InstantCompleteDelayed) {
EXPECT_EQ(INSTANT_COMPLETE_DELAYED, edit_model->instant_complete_behavior());
ASSERT_EQ(ASCIIToUTF16("def"), location_bar_->location_entry()->GetText());
}
+
+// Make sure the renderer doesn't crash if javascript is blocked.
+IN_PROC_BROWSER_TEST_F(InstantTest, DontCrashOnBlockedJS) {
+ browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
+ CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
+ ASSERT_TRUE(test_server()->Start());
+ EnableInstant();
+ ASSERT_NO_FATAL_FAILURE(SetupInstantProvider("search.html"));
+ ASSERT_NO_FATAL_FAILURE(SetupLocationBar());
+ // Wait for notification that the instant API has been determined.
+ ui_test_utils::WaitForNotification(
+ NotificationType::INSTANT_SUPPORT_DETERMINED);
+ // As long as we get the notification we're good (the renderer didn't crash).
+}
« no previous file with comments | « no previous file | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698