Package com.opera.core.systems.arguments

Examples of com.opera.core.systems.arguments.OperaArgument


    assertEquals("bar", arguments.get(0).getValue());
  }

  @Test
  public void testAddArgumentWithObject() {
    OperaArgument argument = new OperaArgument("hooba", "flooba");
    arguments.add(argument);
    assertEquals(argument.getArgument(), arguments.get(0).getArgument());
    assertEquals(argument.getValue(), arguments.get(0).getValue());
  }
View Full Code Here


  @Test
  public void testSize() {
    arguments.add("foo");
    arguments.add("foo", "bar");
    arguments.add(new OperaArgument("hooba", "flooba"));
    assertEquals(3, arguments.size());
  }
View Full Code Here

  @Test
  public void testGettingArgumentsAsStringList() {
    arguments.add("foo");
    arguments.add("foo", "bar");
    arguments.add(new OperaArgument("hooba", "flooba"));
    assertEquals(5, arguments.getArgumentsAsStringList().size());
    assertEquals("-hooba", arguments.getArgumentsAsStringList().get(3));
  }
View Full Code Here

  public OperaArguments(String spaceDelimitedArguments) {
    merge(parse(spaceDelimitedArguments));
  }

  public void add(String key) {
    OperaArgument argument = new OperaArgument(key);
    arguments.add(argument);
  }
View Full Code Here

    OperaArgument argument = new OperaArgument(key);
    arguments.add(argument);
  }

  public void add(String key, Object value) {
    OperaArgument argument = new OperaArgument(key, value);
    arguments.add(argument);
  }
View Full Code Here

    if (profile != null) {
      Dimension resolution = profile.getResolution();
      arguments().add("-windowsize",
                      String.format("%dx%d", resolution.getWidth(), resolution.getHeight()));
      arguments().add(new OperaArgument("-ppi", profile.getPPI()));
      if (profile.getIME() == EmulationProfile.IME.KEYPAD) {
        arguments().add("-notouchwithtouchevents");
      } else if (profile.getIME() == EmulationProfile.IME.TABLET) {
        arguments().add(new OperaArgument("-tabletui"));
      }
      arguments().add("-user-agent-string", profile.getUserAgent());
      arguments().add(new OperaArgument("-profile-name", profile.getProfileName()));
    }
  }
View Full Code Here

    settings.arguments().add("autotestmode");

    // Hack - if we are testing desktop mac the fullscreen argument must be after -pd
    // otherwise the pd setting does not have any effect. So putting it last.
    if (settings.getProduct().is(DESKTOP) && Platform.getCurrent().is(Platform.MAC)) {
      OperaArgument fullscreen = new OperaArgument("fullscreen");
      settings.arguments().remove(fullscreen);
      settings.arguments().add(fullscreen);
    }

    logger.config("Opera arguments: " + settings.arguments().getArgumentsAsStringList());
View Full Code Here

TOP

Related Classes of com.opera.core.systems.arguments.OperaArgument

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.