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://static.webvm.net/appcache-test/simple.html') | 201 self.NavigateToURL('http://www.webkit.org/demos/sticky-notes/index.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') | |
206 self.GetBrowserWindow(0).GetTab(0).GoBack() | 202 self.GetBrowserWindow(0).GetTab(0).GoBack() |
207 test_utils.StringContentCheck( | 203 test_utils.StringContentCheck( |
208 self, self.GetTabContents(), | 204 self, self.GetTabContents(), |
209 ['Manifest', | 205 ['Manifest', |
210 'http://static.webvm.net/appcache-test/resources/simple.manifest'], | 206 'http://www.webkit.org/demos/sticky-notes/StickyNotes.manifest'], |
211 []) | 207 []) |
212 | 208 |
213 def _VerifyAboutDNS(self): | 209 def _VerifyAboutDNS(self): |
214 """Confirm about:dns contains expected content related to DNS info. | 210 """Confirm about:dns contains expected content related to DNS info. |
215 Also confirms that prefetching DNS records propogate.""" | 211 Also confirms that prefetching DNS records propogate.""" |
216 # Navigate to a page to activate DNS prefetching. | 212 # Navigate to a page to activate DNS prefetching. |
217 self.NavigateToURL('http://www.google.com') | 213 self.NavigateToURL('http://www.google.com') |
218 self.GetBrowserWindow(0).GetTab(0).GoBack() | 214 self.GetBrowserWindow(0).GetTab(0).GoBack() |
219 test_utils.StringContentCheck(self, self.GetTabContents(), | 215 test_utils.StringContentCheck(self, self.GetTabContents(), |
220 ['Host name', 'How long ago', 'Motivation'], | 216 ['Host name', 'How long ago', 'Motivation'], |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 IDC_SHOW_DOWNLOADS.""" | 328 IDC_SHOW_DOWNLOADS.""" |
333 for accel, title in self.GetSpecialAcceleratorTabs().iteritems(): | 329 for accel, title in self.GetSpecialAcceleratorTabs().iteritems(): |
334 self.RunCommand(accel) | 330 self.RunCommand(accel) |
335 self.assertTrue(self.WaitUntil( | 331 self.assertTrue(self.WaitUntil( |
336 self.GetActiveTabTitle, expect_retval=title), | 332 self.GetActiveTabTitle, expect_retval=title), |
337 msg='Expected "%s"' % title) | 333 msg='Expected "%s"' % title) |
338 | 334 |
339 | 335 |
340 if __name__ == '__main__': | 336 if __name__ == '__main__': |
341 pyauto_functional.Main() | 337 pyauto_functional.Main() |
OLD | NEW |