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

Side by Side Diff: chrome/browser/extensions/extension_functional_browsertest.cc

Issue 2419433002: Linux Browser Tests: Disable flaky test ExtensionFunctionalTest.TestSetExtensionsState (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/extensions/crx_installer.h" 8 #include "chrome/browser/extensions/crx_installer.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #endif 68 #endif
69 IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, 69 IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest,
70 MAYBE_TestAdblockExtensionCrash) { 70 MAYBE_TestAdblockExtensionCrash) {
71 ExtensionService* service = extension_service(); 71 ExtensionService* service = extension_service();
72 // Verify that the extension is enabled and allowed in incognito 72 // Verify that the extension is enabled and allowed in incognito
73 // is disabled. 73 // is disabled.
74 EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id())); 74 EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id()));
75 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); 75 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));
76 } 76 }
77 77
78 IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, TestSetExtensionsState) { 78 // Failing on Linux: http://crbug.com/654945
79 #if defined(OS_LINUX)
80 #define MAYBE_TestSetExtensionsState DISABLED_TestSetExtensionsState
81 #else
82 #define MAYBE_TestSetExtensionsState TestSetExtensionsState
83 #endif
84 IN_PROC_BROWSER_TEST_F(ExtensionFunctionalTest, MAYBE_TestSetExtensionsState) {
79 InstallExtensionSilently(extension_service(), "google_talk.crx"); 85 InstallExtensionSilently(extension_service(), "google_talk.crx");
80 86
81 // Disable the extension and verify. 87 // Disable the extension and verify.
82 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false); 88 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
83 ExtensionService* service = extension_service(); 89 ExtensionService* service = extension_service();
84 service->DisableExtension(last_loaded_extension_id(), 90 service->DisableExtension(last_loaded_extension_id(),
85 Extension::DISABLE_USER_ACTION); 91 Extension::DISABLE_USER_ACTION);
86 EXPECT_FALSE(service->IsExtensionEnabled(last_loaded_extension_id())); 92 EXPECT_FALSE(service->IsExtensionEnabled(last_loaded_extension_id()));
87 93
88 // Enable the extension and verify. 94 // Enable the extension and verify.
89 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false); 95 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
90 service->EnableExtension(last_loaded_extension_id()); 96 service->EnableExtension(last_loaded_extension_id());
91 EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id())); 97 EXPECT_TRUE(service->IsExtensionEnabled(last_loaded_extension_id()));
92 98
93 // Allow extension in incognito mode and verify. 99 // Allow extension in incognito mode and verify.
94 service->EnableExtension(last_loaded_extension_id()); 100 service->EnableExtension(last_loaded_extension_id());
95 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), true); 101 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), true);
96 EXPECT_TRUE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); 102 EXPECT_TRUE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));
97 103
98 // Disallow extension in incognito mode and verify. 104 // Disallow extension in incognito mode and verify.
99 service->EnableExtension(last_loaded_extension_id()); 105 service->EnableExtension(last_loaded_extension_id());
100 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false); 106 util::SetIsIncognitoEnabled(last_loaded_extension_id(), profile(), false);
101 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile())); 107 EXPECT_FALSE(util::IsIncognitoEnabled(last_loaded_extension_id(), profile()));
102 } 108 }
103 109
104 } // namespace extensions 110 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698