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

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

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. 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/wait_action_unittest.py ('k') | tools/telemetry/telemetry/websocket.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/web_contents.py
diff --git a/tools/telemetry/telemetry/web_contents.py b/tools/telemetry/telemetry/web_contents.py
deleted file mode 100644
index 0940787d6413b9d7be93056076be05276d3c31e9..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/web_contents.py
+++ /dev/null
@@ -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/wait_action_unittest.py ('k') | tools/telemetry/telemetry/websocket.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698