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

Unified Diff: chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc

Issue 1898503002: Cleanup LocalDiscoveryUIHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: similarity 100? Created 4 years, 8 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
Index: chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc
diff --git a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc
index 7e44909abf4988f0a381ba51cdf49948bb35b61a..72b808d2bed941e23157ea64b4f37882d1b21453 100644
--- a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc
+++ b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc
@@ -42,8 +42,7 @@ class ExtensionCloudPrintPrivateApiTest : public ExtensionApiTest {
protected:
// Returns a test server URL, but with host 'www.cloudprintapp.com' so it
- // matches the cloud print app's extent that we set up via command line
- // flags.
+ // matches the cloud print app's extent that we set up via command line flags.
GURL GetTestServerURL(const std::string& path) {
GURL url = embedded_test_server()->GetURL(
"/extensions/api_test/cloud_print_private/" + path);
@@ -63,6 +62,7 @@ using extensions::api::cloud_print_private::UserSettings;
class CloudPrintTestsDelegateMock : public extensions::CloudPrintTestsDelegate {
public:
CloudPrintTestsDelegateMock() {}
Vitaly Buka (NO REVIEWS) 2016/04/21 20:09:45 why not just use the default destructor?
Lei Zhang 2016/04/21 20:50:22 Did you mean with " = default;" or leave it off?
+ ~CloudPrintTestsDelegateMock() override {}
MOCK_METHOD4(SetupConnector,
void(const std::string& user_email,
@@ -88,12 +88,12 @@ MATCHER(IsExpectedUserSettings, "") {
// http://crbug.com/177163
#if defined(OS_WIN) && !defined(NDEBUG)
-#define MAYBE_CloudPrintHosted DISABLED_CloudPrintHosted
+#define MAYBE_CloudPrintHostedWithMock DISABLED_CloudPrintHostedWithMock
#else
-#define MAYBE_CloudPrintHosted CloudPrintHosted
+#define MAYBE_CloudPrintHostedWithMock CloudPrintHostedWithMock
#endif
IN_PROC_BROWSER_TEST_F(ExtensionCloudPrintPrivateApiTest,
- MAYBE_CloudPrintHosted) {
+ MAYBE_CloudPrintHostedWithMock) {
CloudPrintTestsDelegateMock cloud_print_mock;
EXPECT_CALL(cloud_print_mock,
@@ -121,4 +121,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionCloudPrintPrivateApiTest,
ASSERT_TRUE(RunPageTest(page_url.spec()));
}
+IN_PROC_BROWSER_TEST_F(ExtensionCloudPrintPrivateApiTest,
+ CloudPrintHostedIncognito) {
+ GURL page_url = GetTestServerURL(
+ "enable_chrome_connector/cloud_print_incognito_failure_tests.html");
+ ASSERT_TRUE(RunPageTest(page_url.spec(), kFlagUseIncognito));
+}
+
#endif // !defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698