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

Unified Diff: chrome/test/chromedriver/test/run_py_tests.py

Issue 1022543002: [chromedriver] Implement DELETE NetworkConditions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allocate on the stack Created 5 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/chromedriver/server/http_handler.cc ('k') | chrome/test/chromedriver/window_commands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test/run_py_tests.py
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 57e199000e6b0f59f0a4c710ca74aca512b2fc7b..8ed26515ef01a891eb2e8e8486dd64e3e185ca3c 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -800,6 +800,10 @@ class ChromeDriverTest(ChromeDriverBaseTest):
self.assertEquals('0'.zfill(int(10e6)), lots_of_data)
def testEmulateNetworkConditions(self):
+ # Network conditions must be set before it can be retrieved.
+ self.assertRaises(chromedriver.UnknownError,
+ self._driver.GetNetworkConditions)
+
# DSL: 2Mbps throughput, 5ms RTT
latency = 5
throughput = 2048 * 1024
@@ -811,6 +815,11 @@ class ChromeDriverTest(ChromeDriverBaseTest):
self.assertEquals(throughput, network['upload_throughput']);
self.assertEquals(False, network['offline']);
+ # Network Conditions again cannot be retrieved after they've been deleted.
+ self._driver.DeleteNetworkConditions()
+ self.assertRaises(chromedriver.UnknownError,
+ self._driver.GetNetworkConditions)
+
def testEmulateNetworkConditionsName(self):
# DSL: 2Mbps throughput, 5ms RTT
#latency = 5
« no previous file with comments | « chrome/test/chromedriver/server/http_handler.cc ('k') | chrome/test/chromedriver/window_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698