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

Unified Diff: chrome/test/functional/apptest.py

Issue 10095018: Added a new PyAuto method WaitForDomNode() which allows tests to block until a specified node exist… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created a new exception class JavascriptRuntimeException in place of RuntimeException. Created 8 years, 8 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 | « no previous file | chrome/test/pyautolib/dom_mutation_observer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/apptest.py
diff --git a/chrome/test/functional/apptest.py b/chrome/test/functional/apptest.py
index b1abcbd1bd30536d5ebf5eff97b5d3b470c26479..1d09ef2bb5bde2f47faaa06a7564bc2b7d0f4475 100644
--- a/chrome/test/functional/apptest.py
+++ b/chrome/test/functional/apptest.py
@@ -24,11 +24,19 @@ class PyAutoEventsTest(pyauto.PyUITest):
self.GetNextEvent(success_id)
def testDomMutationEvents(self):
- """Basic tests for Dom Mutation observers."""
+ """Basic tests for WaitForDomNode."""
+ url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
+ self.NavigateToURL(url)
+ self.WaitForDomNode(domselector.CSSSelector('#login'), 'Log In')
+ self.NewWebDriver().find_element_by_id('login').click()
+ self.WaitForDomNode(domselector.XPath('id(\'console\')'), '.*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', domselector.XPath('/html/body')))
+ 'exists', domselector.XPath('/html/body')))
self.GetNextEvent(self.AddDomMutationObserver(
'add', domselector.CSSSelector('#login'), expected_value='Log In'))
success_id = self.AddDomMutationObserver(
« no previous file with comments | « no previous file | chrome/test/pyautolib/dom_mutation_observer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698