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

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

Issue 1257603003: Revert of Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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.test.suitebuilder.annotation.LargeTest; 7 import android.test.suitebuilder.annotation.LargeTest;
8 8
9 import org.chromium.base.test.util.Feature; 9 import org.chromium.base.test.util.Feature;
10 import org.chromium.base.test.util.UrlUtils; 10 import org.chromium.base.test.util.UrlUtils;
(...skipping 21 matching lines...) Expand all
32 @Feature({"Browser"}) 32 @Feature({"Browser"})
33 public void testJavaScriptEvalIsCorrectlyOrdered() 33 public void testJavaScriptEvalIsCorrectlyOrdered()
34 throws InterruptedException, Exception, Throwable { 34 throws InterruptedException, Exception, Throwable {
35 launchContentShellWithUrl(JSTEST_URL); 35 launchContentShellWithUrl(JSTEST_URL);
36 assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading()); 36 assertTrue("Page failed to load", waitForActiveShellToBeDoneLoading());
37 37
38 final WebContents webContents = getWebContents(); 38 final WebContents webContents = getWebContents();
39 for (int i = 0; i < 30; ++i) { 39 for (int i = 0; i < 30; ++i) {
40 for (int j = 0; j < 10; ++j) { 40 for (int j = 0; j < 10; ++j) {
41 // Start evaluation of a JavaScript script -- we don't need a re sult. 41 // Start evaluation of a JavaScript script -- we don't need a re sult.
42 webContents.evaluateJavaScriptForTests("foobar();", null); 42 webContents.evaluateJavaScript("foobar();", null);
43 } 43 }
44 // DOMUtils does need to evaluate a JavaScript and get its result to get DOM bounds. 44 // DOMUtils does need to evaluate a JavaScript and get its result to get DOM bounds.
45 assertNotNull("Failed to get bounds", 45 assertNotNull("Failed to get bounds",
46 DOMUtils.getNodeBounds(webContents, "test")); 46 DOMUtils.getNodeBounds(webContents, "test"));
47 } 47 }
48 } 48 }
49 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698