forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't instantiate ContentSuggestionsService on non-Android
BUG=688366 Review-Url: https://codereview.chromium.org/2686053002 Cr-Commit-Position: refs/heads/master@{#449293}
- Loading branch information
treib
authored and
Commit bot
committed
Feb 9, 2017
1 parent
c53be51
commit c18c1ca
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
chrome/browser/ntp_snippets/content_suggestions_service_factory_browsertest.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" | ||
|
||
#include "chrome/browser/ui/browser.h" | ||
#include "chrome/test/base/in_process_browser_test.h" | ||
#include "testing/gtest/include/gtest/gtest.h" | ||
|
||
using ContentSuggestionsServiceFactoryTest = InProcessBrowserTest; | ||
|
||
IN_PROC_BROWSER_TEST_F(ContentSuggestionsServiceFactoryTest, | ||
CreatesServiceOnlyOnAndroid) { | ||
ntp_snippets::ContentSuggestionsService* service = | ||
ContentSuggestionsServiceFactory::GetForProfile(browser()->profile()); | ||
#if defined(OS_ANDROID) | ||
EXPECT_TRUE(service); | ||
#else | ||
EXPECT_FALSE(service); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters