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

Unified Diff: chrome/browser/chrome_content_browser_client_browsertest.cc

Issue 977323003: Disable easter egg on enterprised enrolled devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add browser test for disable easter egg flag Created 5 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 | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client_browsertest.cc
diff --git a/chrome/browser/chrome_content_browser_client_browsertest.cc b/chrome/browser/chrome_content_browser_client_browsertest.cc
index 46bcbd6d12b01f83c2fac5389ee7e58c643fcfd8..6853c267040c645f297a2a62624f3a60572cad46 100644
--- a/chrome/browser/chrome_content_browser_client_browsertest.cc
+++ b/chrome/browser/chrome_content_browser_client_browsertest.cc
@@ -14,6 +14,11 @@
#include "content/public/common/content_switches.h"
#include "url/gurl.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
+#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+#endif
+
namespace content {
class ChromeContentBrowserClientBrowserTest : public InProcessBrowserTest {
@@ -100,4 +105,26 @@ IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
EXPECT_EQ(url, entry->GetVirtualURL());
}
+#if defined(OS_CHROMEOS)
+// Test that the disable Easter Egg switch is appended if Chrome OS and
+// the device is enterprise enrolled.
+IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest,
+ ShouldDisableEasterEgg) {
+ const base::CommandLine& browser_command_line =
+ *base::CommandLine::ForCurrentProcess();
+
+ // policy::BrowserPolicyConnectorChromeOS* connector =
+ // g_browser_process->platform_part()->browser_policy_connector_chromeos();
+ // const bool is_enterprise_managed = connector->IsEnterpriseManaged();
edwardjung 2015/03/11 19:09:48 This doesn't compile as there is no reference to
Andrew T Wilson (Slow) 2015/03/12 15:44:38 Have you tried including browser_process.h? Take
+ const bool is_enterprise_managed = true;
+ if (is_enterprise_managed) {
+ EXPECT_TRUE(browser_command_line.HasSwitch(
+ switches::kDisableDinosaurEasterEgg));
+ } else {
+ EXPECT_FALSE(browser_command_line.HasSwitch(
+ switches::kDisableDinosaurEasterEgg));
+ }
+}
+#endif
+
} // namespace content
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698