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

Unified Diff: chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc

Issue 10831042: Revert 148676 - Revert revert of 146149 - Don't pass the connector check policy flag along. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_browser_main.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc
===================================================================
--- chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc (revision 148676)
+++ chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc (working copy)
@@ -1,77 +0,0 @@
-// Copyright (c) 2012 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 "base/command_line.h"
-#include "base/file_util.h"
-#include "base/path_service.h"
-#include "base/process_util.h"
-#include "base/test/test_timeouts.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_result_codes.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/test/base/in_process_browser_test.h"
-#include "chrome/test/base/ui_test_utils.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/common/result_codes.h"
-
-// These tests don't apply to the Mac version; see GetCommandLineForRelaunch
-// for details.
-#if defined(OS_MACOSX)
-#error This test file should not be part of the Mac build.
-#endif
-
-namespace {
-
-class CloudPrintPolicyTest : public InProcessBrowserTest {
- public:
- CloudPrintPolicyTest() {}
-};
-
-IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, NormalPassedFlag) {
- FilePath test_file_path = ui_test_utils::GetTestFilePath(
- FilePath(), FilePath().AppendASCII("empty.html"));
- CommandLine new_command_line(GetCommandLineForRelaunch());
- new_command_line.AppendArgPath(test_file_path);
-
- content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_TAB_ADDED,
- content::NotificationService::AllSources());
-
- base::ProcessHandle handle;
- bool launched =
- base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle);
- EXPECT_TRUE(launched);
-
- observer.Wait();
-
- int exit_code = -100;
- bool exited =
- base::WaitForExitCodeWithTimeout(handle, &exit_code,
- TestTimeouts::action_timeout_ms());
-
- EXPECT_TRUE(exited);
- EXPECT_EQ(chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED, exit_code);
- base::CloseProcessHandle(handle);
-}
-
-IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, CloudPrintPolicyFlag) {
- CommandLine new_command_line(GetCommandLineForRelaunch());
- new_command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
-
- base::ProcessHandle handle;
- bool launched =
- base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle);
- EXPECT_TRUE(launched);
-
- int exit_code = -100;
- bool exited =
- base::WaitForExitCodeWithTimeout(handle, &exit_code,
- TestTimeouts::action_timeout_ms());
-
- EXPECT_TRUE(exited);
- EXPECT_EQ(content::RESULT_CODE_NORMAL_EXIT, exit_code);
- base::CloseProcessHandle(handle);
-}
-
-} // namespace
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698