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

Unified Diff: chrome/test/functional/apptest.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/functional/ap_lab/pyauto_ap_configurator.py ('k') | chrome/test/functional/autofill.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/apptest.py
===================================================================
--- chrome/test/functional/apptest.py (revision 261231)
+++ chrome/test/functional/apptest.py (working copy)
@@ -1,74 +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 pyauto_functional # must be imported before pyauto
-import pyauto
-
-class PyAutoEventsTest(pyauto.PyUITest):
- """Tests using the event queue."""
-
- def testBasicEvents(self):
- """Basic test for the event queue."""
- url = self.GetHttpURLForDataPath('apptest', 'basic.html')
- driver = self.NewWebDriver()
- event_id = self.AddDomEventObserver(automation_id=4444, recurring=True)
- success_id = self.AddDomEventObserver('test success', automation_id=4444)
- self.NavigateToURL(url)
- self._ExpectEvent(event_id, 'init')
- self._ExpectEvent(event_id, 'login ready')
- driver.find_element_by_id('login').click()
- self._ExpectEvent(event_id, 'login start')
- self._ExpectEvent(event_id, 'login done')
- self.GetNextEvent(success_id)
-
- def testDomMutationEvents(self):
- """Basic tests for WaitForDomNode."""
- url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
- self.NavigateToURL(url)
- self.WaitForDomNode('id("login")', expected_value='Log In')
- self.NewWebDriver().find_element_by_id('login').click()
- self.WaitForDomNode('id("console")', expected_value='.*succeeded.*')
-
- def testDomMutationGenericXPath(self):
- """Test mutation observers with a generic xpath and regexp."""
- url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
- self.NavigateToURL(url)
- self.WaitForDomNode('//a', expected_value='Log In')
- self.NewWebDriver().find_element_by_id('login').click()
- self.WaitForDomNode('//div', expected_value='.*succeeded.*')
-
- def testDomMutationObservers(self):
- """Tests for the various types of Dom Mutation observers."""
- url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
- self.NavigateToURL(url)
- self.GetNextEvent(self.AddDomMutationObserver('add', 'id("login")',
- expected_value='Log In'))
- success_id = self.AddDomMutationObserver('change', 'id("console")',
- expected_value='.*succeeded.*')
- self.NewWebDriver().find_element_by_id('login').click()
- self.GetNextEvent(self.AddDomMutationObserver('remove', 'id("fail")/a'))
- self.GetNextEvent(success_id)
-
- def testWaitUntilNavigationCompletes(self):
- """Basic test for WaitUntilNavigationCompletes."""
- url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
- js = """window.onunload =
- function() {
- window.domAutomationController.send("done");
- };
- window.location.href = "%s";""" % url
- self.ExecuteJavascript(js)
- self.WaitUntilNavigationCompletes()
- self.WaitUntilNavigationCompletes()
- self.WaitForDomNode('id("login")')
-
- def _ExpectEvent(self, event_id, expected_event_name):
- """Checks that the next event is expected."""
- e = self.GetNextEvent(event_id)
- self.assertEqual(e.get('name'), expected_event_name,
- msg="unexpected event: %s" % e)
-
-
-if __name__ == '__main__':
- pyauto_functional.Main()
« no previous file with comments | « chrome/test/functional/ap_lab/pyauto_ap_configurator.py ('k') | chrome/test/functional/autofill.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698