OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 | 8 |
9 import pyauto_functional # Must be imported before pyauto | 9 import pyauto_functional # Must be imported before pyauto |
10 import pyauto | 10 import pyauto |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 google_mac_special_url_tabs = {} | 191 google_mac_special_url_tabs = {} |
192 broken_google_mac_special_url_tabs = {} | 192 broken_google_mac_special_url_tabs = {} |
193 | 193 |
194 google_linux_special_url_tabs = {} | 194 google_linux_special_url_tabs = {} |
195 broken_google_linux_special_url_tabs = {} | 195 broken_google_linux_special_url_tabs = {} |
196 | 196 |
197 def _VerifyAppCacheInternals(self): | 197 def _VerifyAppCacheInternals(self): |
198 """Confirm about:appcache-internals contains expected content for Caches. | 198 """Confirm about:appcache-internals contains expected content for Caches. |
199 Also confirms that the about page populates Application Caches.""" | 199 Also confirms that the about page populates Application Caches.""" |
200 # Navigate to html page to activate DNS prefetching. | 200 # Navigate to html page to activate DNS prefetching. |
201 self.NavigateToURL('http://www.webkit.org/demos/sticky-notes/index.html') | 201 self.NavigateToURL('http://static.webvm.net/appcache-test/simple.html') |
| 202 # Wait for page to load and display sucess or fail message. |
| 203 self.WaitUntil( |
| 204 lambda: self.GetDOMValue('document.getElementById("result").innerHTML'), |
| 205 expect_retval='SUCCESS') |
202 self.GetBrowserWindow(0).GetTab(0).GoBack() | 206 self.GetBrowserWindow(0).GetTab(0).GoBack() |
203 test_utils.StringContentCheck( | 207 test_utils.StringContentCheck( |
204 self, self.GetTabContents(), | 208 self, self.GetTabContents(), |
205 ['Manifest', | 209 ['Manifest', |
206 'http://www.webkit.org/demos/sticky-notes/StickyNotes.manifest'], | 210 'http://static.webvm.net/appcache-test/resources/simple.manifest'], |
207 []) | 211 []) |
208 | 212 |
209 def _VerifyAboutDNS(self): | 213 def _VerifyAboutDNS(self): |
210 """Confirm about:dns contains expected content related to DNS info. | 214 """Confirm about:dns contains expected content related to DNS info. |
211 Also confirms that prefetching DNS records propogate.""" | 215 Also confirms that prefetching DNS records propogate.""" |
212 # Navigate to a page to activate DNS prefetching. | 216 # Navigate to a page to activate DNS prefetching. |
213 self.NavigateToURL('http://www.google.com') | 217 self.NavigateToURL('http://www.google.com') |
214 self.GetBrowserWindow(0).GetTab(0).GoBack() | 218 self.GetBrowserWindow(0).GetTab(0).GoBack() |
215 test_utils.StringContentCheck(self, self.GetTabContents(), | 219 test_utils.StringContentCheck(self, self.GetTabContents(), |
216 ['Host name', 'How long ago', 'Motivation'], | 220 ['Host name', 'How long ago', 'Motivation'], |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 IDC_SHOW_DOWNLOADS.""" | 332 IDC_SHOW_DOWNLOADS.""" |
329 for accel, title in self.GetSpecialAcceleratorTabs().iteritems(): | 333 for accel, title in self.GetSpecialAcceleratorTabs().iteritems(): |
330 self.RunCommand(accel) | 334 self.RunCommand(accel) |
331 self.assertTrue(self.WaitUntil( | 335 self.assertTrue(self.WaitUntil( |
332 self.GetActiveTabTitle, expect_retval=title), | 336 self.GetActiveTabTitle, expect_retval=title), |
333 msg='Expected "%s"' % title) | 337 msg='Expected "%s"' % title) |
334 | 338 |
335 | 339 |
336 if __name__ == '__main__': | 340 if __name__ == '__main__': |
337 pyauto_functional.Main() | 341 pyauto_functional.Main() |
OLD | NEW |