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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/InterstitialPageTest.java

Issue 2503453003: Remove all calls to domAutomationController.setAutomationId.
Patch Set: Fix nacl_browsertest_util.cc Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « content/browser/zoom_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.support.test.filters.LargeTest; 7 import android.support.test.filters.LargeTest;
8 8
9 import org.junit.Assert; 9 import org.junit.Assert;
10 import org.junit.Before; 10 import org.junit.Before;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 @Test 89 @Test
90 @LargeTest 90 @LargeTest
91 @Feature({"Navigation"}) 91 @Feature({"Navigation"})
92 @RetryOnFailure 92 @RetryOnFailure
93 public void testCloseInterstitial() throws ExecutionException { 93 public void testCloseInterstitial() throws ExecutionException {
94 final String proceedCommand = "PROCEED"; 94 final String proceedCommand = "PROCEED";
95 final String htmlContent = "<html>" 95 final String htmlContent = "<html>"
96 + "<head>" 96 + "<head>"
97 + " <script>" 97 + " <script>"
98 + " function sendCommand(command) {" 98 + " function sendCommand(command) {"
99 + " window.domAutomationController.setAutomationId(1);"
100 + " window.domAutomationController.send(command);" 99 + " window.domAutomationController.send(command);"
101 + " }" 100 + " }"
102 + " </script>" 101 + " </script>"
103 + "</head>" 102 + "</head>"
104 + "<body style='background-color:#FF0000' " 103 + "<body style='background-color:#FF0000' "
105 + " onclick='sendCommand(\"" + proceedCommand + "\");'>" 104 + " onclick='sendCommand(\"" + proceedCommand + "\");'>"
106 + " <h1>This is a scary interstitial page</h1>" 105 + " <h1>This is a scary interstitial page</h1>"
107 + "</body>" 106 + "</body>"
108 + "</html>"; 107 + "</html>";
109 final InterstitialPageDelegateAndroid delegate = 108 final InterstitialPageDelegateAndroid delegate =
(...skipping 17 matching lines...) Expand all
127 waitForInterstitial(true); 126 waitForInterstitial(true);
128 Assert.assertTrue("WebContentsObserver not notified of interstitial show ing", 127 Assert.assertTrue("WebContentsObserver not notified of interstitial show ing",
129 observer.isInterstitialShowing()); 128 observer.isInterstitialShowing());
130 TouchCommon.singleClickView( 129 TouchCommon.singleClickView(
131 mActivityTestRule.getContentViewCore().getContainerView(), 10, 1 0); 130 mActivityTestRule.getContentViewCore().getContainerView(), 10, 1 0);
132 waitForInterstitial(false); 131 waitForInterstitial(false);
133 Assert.assertTrue("WebContentsObserver not notified of interstitial hidi ng", 132 Assert.assertTrue("WebContentsObserver not notified of interstitial hidi ng",
134 !observer.isInterstitialShowing()); 133 !observer.isInterstitialShowing());
135 } 134 }
136 } 135 }
OLDNEW
« no previous file with comments | « content/browser/zoom_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698