Package com.opera.core.systems.mobile

Examples of com.opera.core.systems.mobile.OperaMobileEmulation$Builder


    assertEquals(OperaMobileEmulation.UserAgent.ANDROID.toString(), profile.getUserAgent());
  }

  @Test
  public void toJsonSerializesProperly() throws JSONException {
    OperaMobileEmulation profile = (OperaMobileEmulation) OperaMobileEmulation.builder()
        .setProfileName("hoobaflooba").build();
    JSONObject json = profile.toJson();

    assertEquals(profile.getProfileName(), json.get("profileName"));
    assertEquals(profile.getResolution().getWidth(), json.get("width"));
    assertEquals(profile.getResolution().getHeight(), json.get("height"));
    assertEquals(profile.getPPI(), json.get("ppi"));
    assertEquals(profile.getIME().toString().toLowerCase(), json.get("ime"));
    assertEquals(profile.getUserAgent(), json.get("userAgent"));
  }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.mobile.OperaMobileEmulation$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.