Java 类org.apache.cordova.engine.SystemWebView 实例源码

项目:keemob    文件:StandardActivityTest.java   
@Test
public void startUriIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    try {
        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                String uri = webView.getUrl();
                assertFalse(uri.equals(FALSE_URI));
            }
        });
    } catch (Throwable throwable) {
        throwable.printStackTrace();
    }
}
项目:localcloud_fe    文件:StandardActivityTest.java   
@Test
public void startUriIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    try {
        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                String uri = webView.getUrl();
                assertFalse(uri.equals(FALSE_URI));
            }
        });
    } catch (Throwable throwable) {
        throwable.printStackTrace();
    }
}
项目:PreCogSecurity.github.io    文件:StandardActivityTest.java   
@Test
public void startUriIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    try {
        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                String uri = webView.getUrl();
                assertFalse(uri.equals(FALSE_URI));
            }
        });
    } catch (Throwable throwable) {
        throwable.printStackTrace();
    }
}
项目:radioflow    文件:StandardActivityTest.java   
@Test
public void startUriIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    try {
        mActivityRule.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                String uri = webView.getUrl();
                assertFalse(uri.equals(FALSE_URI));
            }
        });
    } catch (Throwable throwable) {
        throwable.printStackTrace();
    }
}
项目:keemob    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:keemob    文件:StandardActivityTest.java   
@Test
public void webViewCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    //Fish the webview out of the mostly locked down Activity using the Android SDK
    View view = activity.getWindow().getCurrentFocus();
    assertEquals(SystemWebView.class, view.getClass());
}
项目:keemob    文件:StandardActivityTest.java   
@Test
public void checkBackgroundIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    CordovaWebView webInterface = webView.getCordovaWebView();
    CordovaPreferences prefs = webInterface.getPreferences();
    assertFalse(prefs.getInteger("backgroundcolor", Color.BLACK) == Color.GREEN);
}
项目:localcloud_fe    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:localcloud_fe    文件:StandardActivityTest.java   
@Test
public void webViewCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    //Fish the webview out of the mostly locked down Activity using the Android SDK
    View view = activity.getWindow().getCurrentFocus();
    assertEquals(SystemWebView.class, view.getClass());
}
项目:localcloud_fe    文件:StandardActivityTest.java   
@Test
public void checkBackgroundIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    CordovaWebView webInterface = webView.getCordovaWebView();
    CordovaPreferences prefs = webInterface.getPreferences();
    assertFalse(prefs.getInteger("backgroundcolor", Color.BLACK) == Color.GREEN);
}
项目:PreCogSecurity.github.io    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:PreCogSecurity.github.io    文件:StandardActivityTest.java   
@Test
public void webViewCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    //Fish the webview out of the mostly locked down Activity using the Android SDK
    View view = activity.getWindow().getCurrentFocus();
    assertEquals(SystemWebView.class, view.getClass());
}
项目:PreCogSecurity.github.io    文件:StandardActivityTest.java   
@Test
public void checkBackgroundIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    CordovaWebView webInterface = webView.getCordovaWebView();
    CordovaPreferences prefs = webInterface.getPreferences();
    assertFalse(prefs.getInteger("backgroundcolor", Color.BLACK) == Color.GREEN);
}
项目:chappiecast    文件:MainActivity.java   
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    // Set by <content src="index.html" /> in config.xml
    loadUrl(launchUrl);
    WebSettings ws = ((SystemWebView)super.appView.getView()).getSettings();
    ws.setMediaPlaybackRequiresUserGesture(false);
}
项目:radioflow    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:radioflow    文件:StandardActivityTest.java   
@Test
public void webViewCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    //Fish the webview out of the mostly locked down Activity using the Android SDK
    View view = activity.getWindow().getCurrentFocus();
    assertEquals(SystemWebView.class, view.getClass());
}
项目:radioflow    文件:StandardActivityTest.java   
@Test
public void checkBackgroundIntentCheck() {
    StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
    final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
    CordovaWebView webInterface = webView.getCordovaWebView();
    CordovaPreferences prefs = webInterface.getPreferences();
    assertFalse(prefs.getInteger("backgroundcolor", Color.BLACK) == Color.GREEN);
}
项目:selendroid    文件:SelendroidWebDriver.java   
private WebChromeClient encapulateWebChromeClientForView(WebView view) {
  if (view.getClass().getSimpleName().equalsIgnoreCase("CordovaWebView")) {
    return encapsulatedCordovaChromeClientForView((CordovaWebView)view);
  } else if (view.getClass().getSimpleName().equalsIgnoreCase("SystemWebView")) {
    return new ExtendedSystemWebChromeClient(new SystemWebViewEngine((SystemWebView)view));
  } else {
    try {
      Object webChromeClient = getWebClientViaReflection(view, "mWebChromeClient");
      if (webChromeClient != null) {
        return new WrappedChromeClient((WebChromeClient) webChromeClient);
      }
    } catch(Exception e) {}
    return new SelendroidWebChromeClient();
  }
}
项目:cordova-plugin-fastrde-injectview    文件:InjectWebViewEngine.java   
public InjectWebViewEngine(SystemWebView webView) {
    super(webView);
    webView.setWebViewClient(new InjectWebViewClient(this));
}
项目:selendroid    文件:SelendroidWebDriver.java   
public SelendroidSystemWebViewClient(SystemWebView view) {
  super(new SystemWebViewEngine(view));
}