Added modified files to consume SWE

Change-Id: I959781dad2a983de6be6ab07f418006a5708c976
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index cb1ffc7..68144e2 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -16,7 +16,7 @@
 
 <!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.browser.tests">
+    package="com.android.swe.browser.tests">
 
     <!-- We add an application tag here just so that we can indicate that
          this package needs to link against the android.test library,
@@ -28,14 +28,14 @@
     <!--
     This declares that this app uses the instrumentation test runner targeting
     the package of com.android.email.  To run the tests use the command:
-    "adb shell am instrument -w com.android.browser.tests/android.test.InstrumentationTestRunner"
+    "adb shell am instrument -w com.android.swe.browser.tests/android.test.InstrumentationTestRunner"
     -->
     <instrumentation android:name="android.test.InstrumentationTestRunner"
-                     android:targetPackage="com.android.browser"
+                     android:targetPackage="com.android.swe.browser"
                      android:label="Tests for Browser."/>
 
-    <instrumentation android:name="com.android.browser.BrowserLaunchPerformance"
-        android:targetPackage="com.android.browser"
+    <instrumentation android:name="com.android.swe.browser.BrowserLaunchPerformance"
+        android:targetPackage="com.android.swe.browser"
         android:label="Browser Launch Performance">
     </instrumentation>
 
diff --git a/tests/src/com/android/browser/BrowserLaunchPerformance.java b/tests/src/com/android/browser/BrowserLaunchPerformance.java
index c5d4279..b2d0574 100644
--- a/tests/src/com/android/browser/BrowserLaunchPerformance.java
+++ b/tests/src/com/android/browser/BrowserLaunchPerformance.java
@@ -1,4 +1,4 @@
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.app.Activity;
 import android.os.Bundle;
@@ -10,7 +10,7 @@
     public void onCreate(Bundle arguments) {
         super.onCreate(arguments);
 
-        mIntent.setClassName(getTargetContext(), "com.android.browser.BrowserActivity");
+        mIntent.setClassName(getTargetContext(), "com.android.swe.browser.BrowserActivity");
         start();
     }
 
diff --git a/tests/src/com/android/browser/BrowserProviderTests.java b/tests/src/com/android/browser/BrowserProviderTests.java
index c63cad1..00b7031 100644
--- a/tests/src/com/android/browser/BrowserProviderTests.java
+++ b/tests/src/com/android/browser/BrowserProviderTests.java
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-package com.android.browser;
+package com.android.swe.browser;
 
-import com.android.browser.provider.BrowserProvider;
-import com.android.browser.provider.BrowserProvider2;
-import com.android.browser.tests.utils.ProviderTestCase3;
+import com.android.swe.browser.provider.BrowserProvider;
+import com.android.swe.browser.provider.BrowserProvider2;
+import com.android.swe.browser.tests.utils.ProviderTestCase3;
 
 import android.app.SearchManager;
 import android.content.ContentValues;
diff --git a/tests/src/com/android/browser/IntentHandlerTests.java b/tests/src/com/android/browser/IntentHandlerTests.java
index 2bdadae..f870363 100644
--- a/tests/src/com/android/browser/IntentHandlerTests.java
+++ b/tests/src/com/android/browser/IntentHandlerTests.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.app.Activity;
 import android.content.Intent;
@@ -21,7 +21,7 @@
 import android.provider.Browser;
 import android.test.ActivityInstrumentationTestCase2;
 import android.text.TextUtils;
-import android.webkit.WebView;
+import org.codeaurora.swe.WebView;
 
 public class IntentHandlerTests extends ActivityInstrumentationTestCase2<BrowserActivity> {
 
diff --git a/tests/src/com/android/browser/PopularUrlsTest.java b/tests/src/com/android/browser/PopularUrlsTest.java
index 566d74b..8e46f5d 100644
--- a/tests/src/com/android/browser/PopularUrlsTest.java
+++ b/tests/src/com/android/browser/PopularUrlsTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.app.Instrumentation;
 import android.content.Intent;
@@ -31,8 +31,7 @@
 import android.webkit.JsPromptResult;
 import android.webkit.JsResult;
 import android.webkit.SslErrorHandler;
-import android.webkit.WebView;
-import android.webkit.WebViewClassic;
+import android.webkit.WebViewClassic
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -47,6 +46,7 @@
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.codeaurora.swe.WebView;
 /**
  *
  * Iterates over a list of URLs from a file and outputs the time to load each.
@@ -248,9 +248,6 @@
                 handler.proceed("user", "passwd");
             }
 
-            /* (non-Javadoc)
-             * @see com.android.browser.TestWebViewClient#onPageFinished(android.webkit.WebView, java.lang.String)
-             */
             @Override
             public void onPageFinished(WebView view, String url) {
                 super.onPageFinished(view, url);
diff --git a/tests/src/com/android/browser/TestWebChromeClient.java b/tests/src/com/android/browser/TestWebChromeClient.java
index e876902..0b818ae 100644
--- a/tests/src/com/android/browser/TestWebChromeClient.java
+++ b/tests/src/com/android/browser/TestWebChromeClient.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.graphics.Bitmap;
 import android.net.Uri;
@@ -22,12 +22,13 @@
 import android.view.View;
 import android.webkit.ConsoleMessage;
 import android.webkit.GeolocationPermissions;
-import android.webkit.JsPromptResult;
-import android.webkit.JsResult;
 import android.webkit.ValueCallback;
-import android.webkit.WebChromeClient;
 import android.webkit.WebStorage;
-import android.webkit.WebView;
+
+import org.codeaurora.swe.JsPromptResult;
+import org.codeaurora.swe.JsResult;
+import org.codeaurora.swe.WebChromeClient;
+import org.codeaurora.swe.WebView;
 
 /**
  *
diff --git a/tests/src/com/android/browser/TestWebViewClient.java b/tests/src/com/android/browser/TestWebViewClient.java
index 6ab40dd..33a1eb6 100644
--- a/tests/src/com/android/browser/TestWebViewClient.java
+++ b/tests/src/com/android/browser/TestWebViewClient.java
@@ -14,19 +14,19 @@
  * limitations under the License.
  */
 
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.graphics.Bitmap;
 import android.net.http.SslError;
 import android.os.Message;
 import android.view.KeyEvent;
-import android.webkit.ClientCertRequestHandler;
-import android.webkit.HttpAuthHandler;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
 import android.webkit.WebViewClientClassicExt;
 
+import org.codeaurora.swe.ClientCertRequestHandler;
+import org.codeaurora.swe.HttpAuthHandler;
+import org.codeaurora.swe.SslErrorHandler;
+import org.codeaurora.swe.WebView;
+import org.codeaurora.swe.WebViewClient;
 /**
  *
  *
diff --git a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
index 2beedf8..24d3f61 100644
--- a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
+++ b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser;
+package com.android.swe.browser;
 
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.MediumTest;
diff --git a/tests/src/com/android/browser/tests/BP1to2UpgradeTests.java b/tests/src/com/android/browser/tests/BP1to2UpgradeTests.java
index 91f7238..6a3c5e2 100644
--- a/tests/src/com/android/browser/tests/BP1to2UpgradeTests.java
+++ b/tests/src/com/android/browser/tests/BP1to2UpgradeTests.java
@@ -14,10 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests;
-
-import com.android.browser.provider.BrowserProvider;
-import com.android.browser.tests.utils.BP2TestCaseHelper;
+package com.android.swe.browser.tests;
 
 import android.content.ContentUris;
 import android.content.ContentValues;
@@ -26,13 +23,16 @@
 import android.graphics.Bitmap.Config;
 import android.net.Uri;
 import android.provider.Browser;
-import android.provider.Browser.BookmarkColumns;
-import android.provider.BrowserContract;
-import android.provider.BrowserContract.Bookmarks;
-import android.provider.BrowserContract.History;
-import android.provider.BrowserContract.Images;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import com.android.swe.browser.platformsupport.BookmarkColumns;
+import com.android.swe.browser.platformsupport.BrowserContract;
+import com.android.swe.browser.platformsupport.BrowserContract.Bookmarks;
+import com.android.swe.browser.platformsupport.BrowserContract.History;
+import com.android.swe.browser.platformsupport.BrowserContract.Images;
+import com.android.swe.browser.provider.BrowserProvider;
+import com.android.swe.browser.tests.utils.BP2TestCaseHelper;
+
 import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
 
diff --git a/tests/src/com/android/browser/tests/BP2ProviderTests.java b/tests/src/com/android/browser/tests/BP2ProviderTests.java
index fa1b9ef..c05a953 100644
--- a/tests/src/com/android/browser/tests/BP2ProviderTests.java
+++ b/tests/src/com/android/browser/tests/BP2ProviderTests.java
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests;
+package com.android.swe.browser.tests;
 
-import com.android.browser.tests.utils.BP2TestCaseHelper;
+import com.android.swe.browser.tests.utils.BP2TestCaseHelper;
 
 import android.content.ContentUris;
 import android.content.ContentValues;
@@ -24,10 +24,11 @@
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.Config;
 import android.net.Uri;
-import android.provider.BrowserContract;
-import android.provider.BrowserContract.Images;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import com.android.swe.browser.platformsupport.BrowserContract;
+import com.android.swe.browser.platformsupport.BrowserContract.Images;
+
 import java.io.ByteArrayOutputStream;
 
 @SmallTest
diff --git a/tests/src/com/android/browser/tests/BP2UriObserverTests.java b/tests/src/com/android/browser/tests/BP2UriObserverTests.java
index 2e84814..f065cfd 100644
--- a/tests/src/com/android/browser/tests/BP2UriObserverTests.java
+++ b/tests/src/com/android/browser/tests/BP2UriObserverTests.java
@@ -14,18 +14,18 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests;
-
-import com.android.browser.tests.utils.BP2TestCaseHelper;
+package com.android.swe.browser.tests;
 
 import android.content.ContentValues;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.Config;
 import android.net.Uri;
-import android.provider.BrowserContract.Bookmarks;
-import android.provider.BrowserContract.History;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import com.android.swe.browser.platformsupport.BrowserContract.Bookmarks;
+import com.android.swe.browser.platformsupport.BrowserContract.History;
+import com.android.swe.browser.tests.utils.BP2TestCaseHelper;
+
 import java.io.ByteArrayOutputStream;
 
 @SmallTest
diff --git a/tests/src/com/android/browser/tests/BookmarksTests.java b/tests/src/com/android/browser/tests/BookmarksTests.java
index bd1a1b2..9ca3413 100644
--- a/tests/src/com/android/browser/tests/BookmarksTests.java
+++ b/tests/src/com/android/browser/tests/BookmarksTests.java
@@ -14,15 +14,15 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests;
-
-import com.android.browser.Bookmarks;
-import com.android.browser.tests.utils.BP2TestCaseHelper;
+package com.android.swe.browser.tests;
 
 import android.content.ContentResolver;
 import android.database.Cursor;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import com.android.swe.browser.Bookmarks;
+import com.android.swe.browser.tests.utils.BP2TestCaseHelper;
+
 /**
  * Extends from BP2TestCaseHelper for the helper methods
  * and to get the mock database
diff --git a/tests/src/com/android/browser/tests/utils/BP2TestCaseHelper.java b/tests/src/com/android/browser/tests/utils/BP2TestCaseHelper.java
index e341c6a..b20d1f0 100644
--- a/tests/src/com/android/browser/tests/utils/BP2TestCaseHelper.java
+++ b/tests/src/com/android/browser/tests/utils/BP2TestCaseHelper.java
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests.utils;
+package com.android.swe.browser.tests.utils;
 
-import com.android.browser.provider.BrowserProvider2;
+import com.android.swe.browser.provider.BrowserProvider2;
 
 import java.io.File;
 import java.io.FilenameFilter;
@@ -25,11 +25,12 @@
 import android.database.ContentObserver;
 import android.net.Uri;
 import android.provider.Browser;
-import android.provider.BrowserContract;
-import android.provider.BrowserContract.Bookmarks;
-import android.provider.BrowserContract.History;
 import android.util.Log;
 
+import com.android.swe.browser.platformsupport.BrowserContract;
+import com.android.swe.browser.platformsupport.BrowserContract.Bookmarks;
+import com.android.swe.browser.platformsupport.BrowserContract.History;
+
 /**
  *  This is a replacement for ProviderTestCase2 that can handle notifyChange testing.
  *  It also has helper methods specifically for testing BrowserProvider2
diff --git a/tests/src/com/android/browser/tests/utils/MockContentResolver2.java b/tests/src/com/android/browser/tests/utils/MockContentResolver2.java
index 4fed65a..2d50a2c 100644
--- a/tests/src/com/android/browser/tests/utils/MockContentResolver2.java
+++ b/tests/src/com/android/browser/tests/utils/MockContentResolver2.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests.utils;
+package com.android.swe.browser.tests.utils;
 
 import com.google.android.collect.Maps;
 
diff --git a/tests/src/com/android/browser/tests/utils/MockObserverNode.java b/tests/src/com/android/browser/tests/utils/MockObserverNode.java
index edcffd4..e000859 100644
--- a/tests/src/com/android/browser/tests/utils/MockObserverNode.java
+++ b/tests/src/com/android/browser/tests/utils/MockObserverNode.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests.utils;
+package com.android.swe.browser.tests.utils;
 
 import android.database.ContentObserver;
 import android.net.Uri;
diff --git a/tests/src/com/android/browser/tests/utils/ProviderTestCase3.java b/tests/src/com/android/browser/tests/utils/ProviderTestCase3.java
index 75bc052..5eedd3b 100644
--- a/tests/src/com/android/browser/tests/utils/ProviderTestCase3.java
+++ b/tests/src/com/android/browser/tests/utils/ProviderTestCase3.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.browser.tests.utils;
+package com.android.swe.browser.tests.utils;
 
 import android.content.ContentProvider;
 import android.content.Context;
@@ -102,7 +102,7 @@
      * Sets up the environment for the test fixture.
      * <p>
      * Creates a new
-     * {@link com.android.browser.tests.utils.MockContentResolver2}, a new IsolatedContext
+     * {@link com.android.swe.browser.tests.utils.MockContentResolver2}, a new IsolatedContext
      * that isolates the provider's file operations, and a new instance of
      * the provider under test within the isolated environment.
      * </p>