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

Unified Diff: tools/chrome_proxy/webdriver/html5.py

Issue 2656433003: Add HTML5 integration test (Closed)
Patch Set: More robust Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/webdriver/html5.py
diff --git a/tools/chrome_proxy/webdriver/html5.py b/tools/chrome_proxy/webdriver/html5.py
new file mode 100644
index 0000000000000000000000000000000000000000..036b019e7150f866754f0b48c2da71d165332586
--- /dev/null
+++ b/tools/chrome_proxy/webdriver/html5.py
@@ -0,0 +1,30 @@
+# Copyright 2017 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 common
+from common import TestDriver
+from common import IntegrationTest
+
+
+class HTML5(IntegrationTest):
+
+ # This test site has a div with id="pointsPanel" that is rendered if the
+ # browser is capable of using HTML5.
+ def testHTML5(self):
+ with TestDriver() as t:
+ t.AddChromeArg('--enable-spdy-proxy-auth')
+ t.LoadURL('http://html5test.com/')
+ t.WaitForJavascriptExpression(
+ 'document.getElementsByClassName("pointsPanel")', 15)
+ checked_main_page = False
+ for response in t.GetHTTPResponses():
+ # Site has a lot on it, just check the main page.
+ if (response.url == 'http://html5test.com/'
+ or response.url == 'http://html5test.com/index.html'):
+ self.assertHasChromeProxyViaHeader(response)
+ checked_main_page = True
+ if not checked_main_page:
+ self.fail("Did not check any page!")
+if __name__ == '__main__':
+ IntegrationTest.RunAllTests()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698