Index: chrome/browser/chrome_content_browser_client_unittest.cc |
diff --git a/chrome/browser/chrome_content_browser_client_unittest.cc b/chrome/browser/chrome_content_browser_client_unittest.cc |
index 45ecd0a3457d4a13ae7355251007ff30d29b46d9..c8b4b437fb7fb17411290b30b3ac72a07a5c3a01 100644 |
--- a/chrome/browser/chrome_content_browser_client_unittest.cc |
+++ b/chrome/browser/chrome_content_browser_client_unittest.cc |
@@ -28,6 +28,7 @@ |
#if !defined(OS_ANDROID) |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
+#include "chrome/common/pref_names.h" |
#include "chrome/test/base/browser_with_test_window_test.h" |
#include "chrome/test/base/search_test_utils.h" |
#endif |
@@ -53,6 +54,14 @@ static void DidOpenURLForWindowTest(content::WebContents** target_contents, |
*target_contents = opened_contents; |
} |
+TEST_F(ChromeContentBrowserClientWindowTest, IsDataSaverEnabled) { |
+ ChromeContentBrowserClient client; |
+ content::BrowserContext* context = browser()->profile(); |
+ EXPECT_FALSE(client.IsDataSaverEnabled(context)); |
+ browser()->profile()->GetPrefs()->SetBoolean(prefs::kDataSaverEnabled, true); |
+ EXPECT_TRUE(client.IsDataSaverEnabled(context)); |
+} |
+ |
// This test opens two URLs using ContentBrowserClient::OpenURL. It expects the |
// URLs to be opened in new tabs and activated, changing the active tabs after |
// each call and increasing the tab count by 2. |