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

Unified Diff: clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PrivacyHelper.java

Issue 1703863003: Created separate shards for suspicious testcases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI Automator test case for chrome://crash. Created 4 years, 8 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 | « clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PageHelper.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PrivacyHelper.java
diff --git a/clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PrivacyHelper.java b/clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PrivacyHelper.java
new file mode 100644
index 0000000000000000000000000000000000000000..28e1b9a823dfa6a39af12c30fabbecaecf1f4628
--- /dev/null
+++ b/clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PrivacyHelper.java
@@ -0,0 +1,38 @@
+// Copyright 2013 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.
+
+package com.google.android.apps.chrome.uiautomator.utilities;
+
+import android.support.test.uiautomator.UiDevice;
+import android.support.test.uiautomator.UiObject;
+import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiSelector;
+
+import com.google.android.apps.uiautomator.utilities.HelperBase;
+
+/**
+ * Helper for interacting with the Privacy menu.
+ */
+public class PrivacyHelper extends HelperBase {
+ private final UiObject mUsageAndCrashReports;
+
+ public PrivacyHelper(UiDevice uiDevice) {
+ super(uiDevice);
+ mUsageAndCrashReports = getDevice().findObject(new UiSelector()
+ .text("Usage and crash reports").className("android.widget.TextView"));
+ }
+
+ /**
+ * Turn on usage and crash reports.
+ */
+ public void turnOnUsageAndCrashReports() throws UiObjectNotFoundException {
+ mUsageAndCrashReports.click();
+ try {
+ getDevice().findObject(new UiSelector().text("Always send")).click();
+ } catch (Exception e) {
+ }
+ getDevice().findObject(new UiSelector().description("Navigate up")
+ .className("android.widget.ImageButton")).click();
+ }
+}
« no previous file with comments | « clank/test/geppetto/clanktests/src/com/google/android/apps/chrome/uiautomator/utilities/PageHelper.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698