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

Unified Diff: chrome/test/pyautolib/chromeos/enable_testing.py

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 9 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/test/pyautolib/chromeos/chromeos_utils.py ('k') | chrome/test/pyautolib/chromeos/power_strip.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/chromeos/enable_testing.py
===================================================================
--- chrome/test/pyautolib/chromeos/enable_testing.py (revision 261231)
+++ chrome/test/pyautolib/chromeos/enable_testing.py (working copy)
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 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.
-
-"""Enable chrome testing interface on ChromeOS.
-
-Enables chrome automation over a named automation channel on ChromeOS.
-Also, allows passing extra flags to chrome (--extra-chrome-flags).
-The path to named testing interface automation socket is printed out.
-
-Needs to be run with superuser privileges.
-
-Usage:
- sudo python enable_testing.py --extra-chrome-flags="--homepage=about:blank"
-"""
-
-import dbus
-import optparse
-import os
-import sys
-
-
-class EnableChromeTestingOnChromeOS(object):
- """Helper to enable chrome testing interface on ChromeOS.
-
- Also, can add additional flags to chrome to be used for testing.
- """
-
- SESSION_MANAGER_INTERFACE = 'org.chromium.SessionManagerInterface'
- SESSION_MANAGER_PATH = '/org/chromium/SessionManager'
- SESSION_MANAGER_SERVICE = 'org.chromium.SessionManager'
-
- def _ParseArgs(self):
- parser = optparse.OptionParser()
- parser.add_option(
- '', '--extra-chrome-flags', action='append', default=[],
- help='Pass extra flags to chrome.')
- self._options, self._args = parser.parse_args()
-
- def Run(self):
- self._ParseArgs()
- assert os.geteuid() == 0, 'Needs superuser privileges.'
- system_bus = dbus.SystemBus()
- manager = dbus.Interface(system_bus.get_object(self.SESSION_MANAGER_SERVICE,
- self.SESSION_MANAGER_PATH),
- self.SESSION_MANAGER_INTERFACE)
- print manager.EnableChromeTesting(True, self._options.extra_chrome_flags)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(EnableChromeTestingOnChromeOS().Run())
« no previous file with comments | « chrome/test/pyautolib/chromeos/chromeos_utils.py ('k') | chrome/test/pyautolib/chromeos/power_strip.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698