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

Unified Diff: tools/telemetry/telemetry/core/chrome/inspector_page_unittest.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
Index: tools/telemetry/telemetry/core/chrome/inspector_page_unittest.py
===================================================================
--- tools/telemetry/telemetry/core/chrome/inspector_page_unittest.py (revision 182999)
+++ tools/telemetry/telemetry/core/chrome/inspector_page_unittest.py (working copy)
@@ -1,57 +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.
-import os
-
-from telemetry.test import tab_test_case
-
-class InspectorPageTest(tab_test_case.TabTestCase):
- def __init__(self, *args):
- super(InspectorPageTest, self).__init__(*args)
-
- def testPageNavigateToNormalUrl(self):
- self._tab.Navigate('http://www.google.com')
- self._tab.WaitForDocumentReadyStateToBeComplete()
-
- def testPageNavigateToUrlChanger(self):
- # The Url that we actually load is http://www.youtube.com/.
- self._tab.Navigate('http://youtube.com/')
-
- self._tab.WaitForDocumentReadyStateToBeComplete()
-
- def testPageNavigateToImpossibleURL(self):
- self._tab.Navigate('http://23f09f0f9fsdflajsfaldfkj2f3f.com')
- self._tab.WaitForDocumentReadyStateToBeComplete()
-
- def testCustomActionToNavigate(self):
- unittest_data_dir = os.path.join(os.path.dirname(__file__),
- '..', '..', '..', 'unittest_data')
- self._browser.SetHTTPServerDirectory(unittest_data_dir)
- self._tab.Navigate(
- self._browser.http_server.UrlOf('page_with_link.html'))
- self._tab.WaitForDocumentReadyStateToBeComplete()
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/page_with_link.html')
-
- custom_action_called = [False]
- def CustomAction():
- custom_action_called[0] = True
- self._tab.ExecuteJavaScript('document.getElementById("clickme").click();')
-
- self._tab.PerformActionAndWaitForNavigate(CustomAction)
-
- self.assertTrue(custom_action_called[0])
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.location.pathname;'),
- '/blank.html')
-
- def testGetCookieByName(self):
- unittest_data_dir = os.path.join(os.path.dirname(__file__),
- '..', '..', '..', 'unittest_data')
- self._browser.SetHTTPServerDirectory(unittest_data_dir)
- self._tab.Navigate(
- self._browser.http_server.UrlOf('blank.html'))
- self._tab.WaitForDocumentReadyStateToBeComplete()
- self._tab.ExecuteJavaScript('document.cookie="foo=bar"')
- self.assertEquals(self._tab.GetCookieByName('foo'), 'bar')
« no previous file with comments | « tools/telemetry/telemetry/core/chrome/inspector_page.py ('k') | tools/telemetry/telemetry/core/chrome/inspector_runtime.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698