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

Unified Diff: chrome/test/webdriver/test/content_setting_test.html

Issue 8890026: Allow chromedriver to set local state preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years 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
Index: chrome/test/webdriver/test/content_setting_test.html
diff --git a/chrome/test/webdriver/test/content_setting_test.html b/chrome/test/webdriver/test/content_setting_test.html
new file mode 100644
index 0000000000000000000000000000000000000000..aae4e6484dd73bae33db99f63eab1a1c429b1a94
--- /dev/null
+++ b/chrome/test/webdriver/test/content_setting_test.html
@@ -0,0 +1,21 @@
+<script>
+var g_callback = null;
+var g_geoDone = false;
+function waitForGeo(doneCallback) {
+ if (g_geoDone) {
+ doneCallback();
+ } else {
+ g_callback = doneCallback;
+ }
+}
+
+function geoDone() {
+ g_geoDone = true;
+ if (g_callback)
+ g_callback();
+}
+
+// Don't care whether geo succeeds or fails, just whether it gets past the
+// infobar.
+navigator.geolocation.getCurrentPosition(geoDone, geoDone);
+</script>

Powered by Google App Engine
This is Rietveld 408576698