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

Unified Diff: tools/telemetry/telemetry/core/web_contents.py

Issue 12294002: Revert 182991 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « tools/telemetry/telemetry/core/util_unittest.py ('k') | tools/telemetry/telemetry/core/wpr_modes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/web_contents.py
===================================================================
--- tools/telemetry/telemetry/core/web_contents.py (revision 182999)
+++ tools/telemetry/telemetry/core/web_contents.py (working copy)
@@ -1,66 +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.
-
-DEFAULT_WEB_CONTENTS_TIMEOUT = 60
-
-# TODO(achuith, dtu, nduca): Add unit tests specifically for WebContents,
-# independent of Tab.
-class WebContents(object):
- """Represents web contents in the browser"""
- def __init__(self, inspector_backend):
- self._inspector_backend = inspector_backend
-
- def __del__(self):
- self.Disconnect()
-
- def Disconnect(self):
- self._inspector_backend.Disconnect()
-
- def WaitForDocumentReadyStateToBeComplete(self,
- timeout=DEFAULT_WEB_CONTENTS_TIMEOUT):
- self._inspector_backend.WaitForDocumentReadyStateToBeComplete(timeout)
-
- def WaitForDocumentReadyStateToBeInteractiveOrBetter(self,
- timeout=DEFAULT_WEB_CONTENTS_TIMEOUT):
- self._inspector_backend.WaitForDocumentReadyStateToBeInteractiveOrBetter(
- timeout)
-
- def ExecuteJavaScript(self, expr, timeout=DEFAULT_WEB_CONTENTS_TIMEOUT):
- """Executes expr in JavaScript. Does not return the result.
-
- If the expression failed to evaluate, EvaluateException will be raised.
- """
- self._inspector_backend.ExecuteJavaScript(expr, timeout)
-
- def EvaluateJavaScript(self, expr, timeout=DEFAULT_WEB_CONTENTS_TIMEOUT):
- """Evalutes expr in JavaScript and returns the JSONized result.
-
- Consider using ExecuteJavaScript for cases where the result of the
- expression is not needed.
-
- If evaluation throws in JavaScript, a Python EvaluateException will
- be raised.
-
- If the result of the evaluation cannot be JSONized, then an
- EvaluationException will be raised.
- """
- return self._inspector_backend.EvaluateJavaScript(expr, timeout)
-
- @property
- def message_output_stream(self):
- return self._inspector_backend.message_output_stream
-
- @message_output_stream.setter
- def message_output_stream(self, stream):
- self._inspector_backend.message_output_stream = stream
-
- @property
- def timeline_model(self):
- return self._inspector_backend.timeline_model
-
- def StartTimelineRecording(self):
- self._inspector_backend.StartTimelineRecording()
-
- def StopTimelineRecording(self):
- self._inspector_backend.StopTimelineRecording()
« no previous file with comments | « tools/telemetry/telemetry/core/util_unittest.py ('k') | tools/telemetry/telemetry/core/wpr_modes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698