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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java

Issue 141533006: [Android] Move the java content/ package to content_public/ to start the split. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small fixes and findbugs line update Created 6 years, 11 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
Index: content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java
deleted file mode 100644
index 846512e3a94ee3d547d61fd00a4e6df749300fb6..0000000000000000000000000000000000000000
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeTestBase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2012 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 org.chromium.content.browser;
-
-import junit.framework.Assert;
-
-/**
- * Common functionality for testing the Java Bridge.
- */
-public class JavaBridgeTestBase extends ContentViewTestBase {
- protected class Controller {
- private boolean mIsResultReady;
-
- protected synchronized void notifyResultIsReady() {
- mIsResultReady = true;
- notify();
- }
- protected synchronized void waitForResult() {
- while (!mIsResultReady) {
- try {
- wait(5000);
- } catch (Exception e) {
- continue;
- }
- if (!mIsResultReady) {
- Assert.fail("Wait timed out");
- }
- }
- mIsResultReady = false;
- }
- }
-
- protected void executeJavaScript(final String script) throws Throwable {
- runTestOnUiThread(new Runnable() {
- @Override
- public void run() {
- // When a JavaScript URL is executed, if the value of the last
- // expression evaluated is not 'undefined', this value is
- // converted to a string and used as the new document for the
- // frame. We don't want this behaviour, so wrap the script in
- // an anonymous function.
- getContentView().loadUrl(new LoadUrlParams(
- "javascript:(function() { " + script + " })()"));
- }
- });
- }
-}

Powered by Google App Engine
This is Rietveld 408576698