OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
8 #include "chrome/browser/search/instant_service_factory.h" | 8 #include "chrome/browser/search/instant_service_factory.h" |
9 #include "chrome/browser/search/search.h" | 9 #include "chrome/browser/search/search.h" |
10 #include "chrome/browser/ui/search/instant_ntp.h" | 10 #include "chrome/browser/ui/search/instant_ntp.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 TEST_F(InstantNTPPrerendererTest, IsJavascriptEnabledChecksPrefs) { | 236 TEST_F(InstantNTPPrerendererTest, IsJavascriptEnabledChecksPrefs) { |
237 instant_ntp_prerenderer()->set_override_javascript_enabled(false); | 237 instant_ntp_prerenderer()->set_override_javascript_enabled(false); |
238 instant_ntp_prerenderer()->profile()->GetPrefs()->SetBoolean( | 238 instant_ntp_prerenderer()->profile()->GetPrefs()->SetBoolean( |
239 prefs::kWebKitJavascriptEnabled, true); | 239 prefs::kWebKitJavascriptEnabled, true); |
240 EXPECT_TRUE(instant_ntp_prerenderer()->IsJavascriptEnabled()); | 240 EXPECT_TRUE(instant_ntp_prerenderer()->IsJavascriptEnabled()); |
241 instant_ntp_prerenderer()->profile()->GetPrefs()->SetBoolean( | 241 instant_ntp_prerenderer()->profile()->GetPrefs()->SetBoolean( |
242 prefs::kWebKitJavascriptEnabled, false); | 242 prefs::kWebKitJavascriptEnabled, false); |
243 EXPECT_FALSE(instant_ntp_prerenderer()->IsJavascriptEnabled()); | 243 EXPECT_FALSE(instant_ntp_prerenderer()->IsJavascriptEnabled()); |
244 } | 244 } |
OLD | NEW |