Commit ce1fe72d authored by jam@chromium.org's avatar jam@chromium.org

Remove kEnablePrintPreview now that the pdf plugin is part of Chromium.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/296453015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272587 0039d316-1c4b-4281-b951-d872f2087c98
parent df0c843f
......@@ -1101,23 +1101,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WebContentsHasFocus) {
->HasFocus());
}
// The next three tests will only run automatically with Chrome branded builds
// because they require the PDF preview plug-in. To run these tests manually for
// Chromium (non-Chrome branded) builds in a development environment:
//
// 1) Remove "MAYBE_" in the first line of each test definition
// 2) Build Chromium browser_tests
// 3) Make a copy of the PDF plug-in from a recent version of Chrome (Canary
// or a recent development build) to your Chromium build:
// - On Linux and Chrome OS, copy /opt/google/chrome/libpdf.so to
// <path-to-your-src>/out/Debug
// - On OS X, copy PDF.plugin from
// <recent-chrome-app-folder>/*/*/*/*/"Internet Plug-Ins" to
// <path-to-your-src>/out/Debug/Chromium.app/*/*/*/*/"Internet Plug-Ins"
// 4) Run browser_tests with the --enable-print-preview flag
#if !defined(GOOGLE_CHROME_BUILD) || \
(defined(GOOGLE_CHROME_BUILD) && (defined(OS_WIN) || defined(OS_LINUX)))
#if defined(OS_WIN) || defined(OS_LINUX)
#define MAYBE_WindowDotPrintShouldBringUpPrintPreview \
DISABLED_WindowDotPrintShouldBringUpPrintPreview
#else
......@@ -1132,17 +1116,9 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
preview_delegate.WaitUntilPreviewIsReady();
}
#if !defined(GOOGLE_CHROME_BUILD)
#define MAYBE_ClosingWindowWhilePrintingShouldNotCrash \
DISABLED_ClosingWindowWhilePrintingShouldNotCrash
#else
#define MAYBE_ClosingWindowWhilePrintingShouldNotCrash \
ClosingWindowWhilePrintingShouldNotCrash
#endif
// This test verifies that http://crbug.com/297179 is fixed.
IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
MAYBE_ClosingWindowWhilePrintingShouldNotCrash) {
ClosingWindowWhilePrintingShouldNotCrash) {
ScopedPreviewTestingDelegate preview_delegate(false);
ASSERT_TRUE(RunPlatformAppTest("platform_apps/print_api")) << message_;
preview_delegate.WaitUntilPreviewIsReady();
......@@ -1151,7 +1127,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
// This test currently only passes on OS X (on other platforms the print preview
// dialog's size is limited by the size of the window being printed).
#if !defined(GOOGLE_CHROME_BUILD) || !defined(OS_MACOSX)
#if !defined(OS_MACOSX)
#define MAYBE_PrintPreviewShouldNotBeTooSmall \
DISABLED_PrintPreviewShouldNotBeTooSmall
#else
......
......@@ -57,11 +57,7 @@ const CommandLinePrefStore::BooleanSwitchToPreferenceMapEntry
prefs::kAllowCrossOriginAuthPrompt, true },
{ switches::kDisableSSLFalseStart, prefs::kDisableSSLRecordSplitting,
true },
#if defined(GOOGLE_CHROME_BUILD)
{ switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true },
#else
{ switches::kEnablePrintPreview, prefs::kPrintPreviewDisabled, false },
#endif
#if defined(OS_CHROMEOS)
{ chromeos::switches::kEnableTouchpadThreeFingerClick,
prefs::kEnableTouchpadThreeFingerClick, true },
......
......@@ -2,14 +2,12 @@
// 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/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/print_messages.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
......@@ -123,12 +121,6 @@ class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
}
private:
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
#if !defined(GOOGLE_CHROME_BUILD)
command_line->AppendSwitch(switches::kEnablePrintPreview);
#endif
}
virtual void SetUpOnMainThread() OVERRIDE {
WebContents* first_tab =
browser()->tab_strip_model()->GetActiveWebContents();
......
......@@ -353,11 +353,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(
prefs::kPrintPreviewDisabled,
#if defined(GOOGLE_CHROME_BUILD)
false,
#else
true,
#endif
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterBooleanPref(
prefs::kForceEphemeralProfiles,
......
......@@ -2,7 +2,6 @@
// 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/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
......@@ -13,7 +12,6 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
......@@ -46,12 +44,6 @@ class PrintPreviewTest : public InProcessBrowserTest {
public:
PrintPreviewTest() {}
#if !defined(GOOGLE_CHROME_BUILD)
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
command_line->AppendSwitch(switches::kEnablePrintPreview);
}
#endif
void Print() {
content::TestNavigationObserver nav_observer(NULL);
nav_observer.StartWatchingNewWebContents();
......
......@@ -331,6 +331,9 @@ const char kDisablePreconnect[] = "disable-preconnect";
const char kDisablePrerenderLocalPredictor[] =
"disable-prerender-local-predictor";
// Disables print preview (For testing, and for users who don't like us. :[ )
const char kDisablePrintPreview[] = "disable-print-preview";
// Normally when the user attempts to navigate to a page that was the result of
// a post we prompt to make sure they want to. This switch may be used to
// disable that check. This switch is used during automated testing.
......@@ -1409,18 +1412,6 @@ const char kDebugPrint[] = "debug-print";
const char kFileManagerExtensionPath[] = "filemgr-ext-path";
#endif
// Controls print preview in the browser process.
#if defined(GOOGLE_CHROME_BUILD)
// Disables print preview (For testing, and for users who don't like us. :[ )
const char kDisablePrintPreview[] = "disable-print-preview";
#else
// Enables print preview. Chromium normally does not have the PDF viewer,
// required for print preview.
// pdf.dll or libpdf.so should be present in primary directory of
// Chromium. For local builds it's usually out/Debug or out/Release.
const char kEnablePrintPreview[] = "enable-print-preview";
#endif
// -----------------------------------------------------------------------------
// DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
//
......
......@@ -100,6 +100,7 @@ extern const char kDisablePnacl[];
extern const char kDisablePopupBlocking[];
extern const char kDisablePreconnect[];
extern const char kDisablePrerenderLocalPredictor[];
extern const char kDisablePrintPreview[];
extern const char kDisablePromptOnRepost[];
extern const char kDisableQuic[];
extern const char kDisableQuicHttps[];
......@@ -407,12 +408,6 @@ extern const char kDebugPrint[];
extern const char kFileManagerExtensionPath[];
#endif
#if defined(GOOGLE_CHROME_BUILD)
extern const char kDisablePrintPreview[];
#else
extern const char kEnablePrintPreview[];
#endif
// DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
// alphabetical order, or in one of the ifdefs (also in order in each section).
......
......@@ -4,17 +4,6 @@
#include "chrome/test/data/webui/print_preview.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
PrintPreviewWebUITest::PrintPreviewWebUITest() {}
PrintPreviewWebUITest::~PrintPreviewWebUITest() {}
// Always print preview for testing.
void PrintPreviewWebUITest::SetUpCommandLine(CommandLine* command_line) {
WebUIBrowserTest::SetUpCommandLine(command_line);
#if !defined(GOOGLE_CHROME_BUILD)
command_line->AppendSwitch(switches::kEnablePrintPreview);
#endif
}
......@@ -13,9 +13,6 @@ class PrintPreviewWebUITest : public WebUIBrowserTest {
virtual ~PrintPreviewWebUITest();
private:
// WebUIBrowserTest implementation.
virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(PrintPreviewWebUITest);
};
......
......@@ -62,7 +62,7 @@ class PathContext(object):
"""A PathContext is used to carry the information used to construct URLs and
paths when dealing with the storage server and archives."""
def __init__(self, base_url, platform, good_revision, bad_revision,
is_official, is_aura, flash_path = None, pdf_path = None):
is_official, is_aura, flash_path = None):
super(PathContext, self).__init__()
# Store off the input parameters.
self.base_url = base_url
......@@ -72,7 +72,6 @@ class PathContext(object):
self.is_official = is_official
self.is_aura = is_aura
self.flash_path = flash_path
self.pdf_path = pdf_path
# The name of the ZIP file in a revision directory on the server.
self.archive_name = None
......@@ -363,7 +362,7 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args):
# Run the build as many times as specified.
testargs = ['--user-data-dir=%s' % profile] + args
# The sandbox must be run as root on Official Chrome, so bypass it.
if ((context.is_official or context.flash_path or context.pdf_path) and
if ((context.is_official or context.flash_path) and
context.platform.startswith('linux')):
testargs.append('--no-sandbox')
if context.flash_path:
......@@ -373,10 +372,6 @@ def RunRevision(context, revision, zipfile, profile, num_runs, command, args):
# pass the correct version we just spoof it.
testargs.append('--ppapi-flash-version=99.9.999.999')
if context.pdf_path:
shutil.copy(context.pdf_path, os.path.dirname(context.GetLaunchPath()))
testargs.append('--enable-print-preview')
runcommand = []
for token in shlex.split(command):
if token == "%a":
......@@ -469,7 +464,6 @@ def Bisect(base_url,
try_args=(),
profile=None,
flash_path=None,
pdf_path=None,
interactive=True,
evaluate=AskIsGoodBuild):
"""Given known good and known bad revisions, run a binary search on all
......@@ -506,7 +500,7 @@ def Bisect(base_url,
profile = 'profile'
context = PathContext(base_url, platform, good_rev, bad_rev,
official_builds, is_aura, flash_path, pdf_path)
official_builds, is_aura, flash_path)
cwd = os.getcwd()
print "Downloading list of known revisions..."
......@@ -755,12 +749,6 @@ def main():
'binary to be used in this bisection (e.g. ' +
'on Windows C:\...\pepflashplayer.dll and on Linux ' +
'/opt/google/chrome/PepperFlash/libpepflashplayer.so).')
parser.add_option('-d', '--pdf_path', type = 'str',
help = 'Absolute path to a recent PDF pluggin ' +
'binary to be used in this bisection (e.g. ' +
'on Windows C:\...\pdf.dll and on Linux ' +
'/opt/google/chrome/libpdf.so). Option also enables ' +
'print preview.')
parser.add_option('-g', '--good', type = 'str',
help = 'A good revision to start bisection. ' +
'May be earlier or later than the bad revision. ' +
......@@ -831,11 +819,6 @@ def main():
msg = 'Could not find Flash binary at %s' % flash_path
assert os.path.exists(flash_path), msg
if opts.pdf_path:
pdf_path = opts.pdf_path
msg = 'Could not find PDF binary at %s' % pdf_path
assert os.path.exists(pdf_path), msg
if opts.official_builds:
good_rev = LooseVersion(good_rev)
bad_rev = LooseVersion(bad_rev)
......@@ -852,7 +835,7 @@ def main():
(min_chromium_rev, max_chromium_rev) = Bisect(
base_url, opts.archive, opts.official_builds, opts.aura, good_rev,
bad_rev, opts.times, opts.command, args, opts.profile, opts.flash_path,
opts.pdf_path, not opts.not_interactive)
not opts.not_interactive)
# Get corresponding blink revisions.
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment