OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ASSERT_TRUE(pref); | 66 ASSERT_TRUE(pref); |
67 EXPECT_TRUE(pref->IsExtensionControlled()); | 67 EXPECT_TRUE(pref->IsExtensionControlled()); |
68 EXPECT_TRUE(otr_prefs->GetBoolean(prefs::kBlockThirdPartyCookies)); | 68 EXPECT_TRUE(otr_prefs->GetBoolean(prefs::kBlockThirdPartyCookies)); |
69 | 69 |
70 pref = prefs->FindPreference(prefs::kBlockThirdPartyCookies); | 70 pref = prefs->FindPreference(prefs::kBlockThirdPartyCookies); |
71 ASSERT_TRUE(pref); | 71 ASSERT_TRUE(pref); |
72 EXPECT_FALSE(pref->IsExtensionControlled()); | 72 EXPECT_FALSE(pref->IsExtensionControlled()); |
73 EXPECT_FALSE(prefs->GetBoolean(prefs::kBlockThirdPartyCookies)); | 73 EXPECT_FALSE(prefs->GetBoolean(prefs::kBlockThirdPartyCookies)); |
74 } | 74 } |
75 | 75 |
76 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceIncognitoDisabled) { | 76 // Flakily times out: http://crbug.com/106144 |
| 77 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_PreferenceIncognitoDisabled) { |
77 CommandLine::ForCurrentProcess()->AppendSwitch( | 78 CommandLine::ForCurrentProcess()->AppendSwitch( |
78 switches::kEnableExperimentalExtensionApis); | 79 switches::kEnableExperimentalExtensionApis); |
79 | 80 |
80 EXPECT_FALSE(RunExtensionTest("preference/persistent_incognito")); | 81 EXPECT_FALSE(RunExtensionTest("preference/persistent_incognito")); |
81 } | 82 } |
82 | 83 |
83 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceSessionOnlyIncognito) { | 84 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceSessionOnlyIncognito) { |
84 CommandLine::ForCurrentProcess()->AppendSwitch( | 85 CommandLine::ForCurrentProcess()->AppendSwitch( |
85 switches::kEnableExperimentalExtensionApis); | 86 switches::kEnableExperimentalExtensionApis); |
86 | 87 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceOnChange) { | 127 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceOnChange) { |
127 CommandLine::ForCurrentProcess()->AppendSwitch( | 128 CommandLine::ForCurrentProcess()->AppendSwitch( |
128 switches::kEnableExperimentalExtensionApis); | 129 switches::kEnableExperimentalExtensionApis); |
129 | 130 |
130 PrefService* prefs = browser()->profile()->GetPrefs(); | 131 PrefService* prefs = browser()->profile()->GetPrefs(); |
131 prefs->SetBoolean(prefs::kBlockThirdPartyCookies, false); | 132 prefs->SetBoolean(prefs::kBlockThirdPartyCookies, false); |
132 | 133 |
133 EXPECT_TRUE(RunExtensionTestIncognito("preference/onchange")) << | 134 EXPECT_TRUE(RunExtensionTestIncognito("preference/onchange")) << |
134 message_; | 135 message_; |
135 } | 136 } |
OLD | NEW |