Package org.auraframework.system

Examples of org.auraframework.system.Client


      String cmporapp = "app";
      DefDescriptor<ApplicationDef> appDesc = DefDescriptorImpl.getInstance(cmpname,
          ApplicationDef.class);
        AuraContext context = Aura.getContextService()
                .startContext(Mode.DEV, AuraContext.Format.CSS, AuraContext.Authentication.AUTHENTICATED, appDesc);
        Client clientWEBKIT = new Client(ua);
        assertEquals(uaType,clientWEBKIT.getType());
    context.setClient(clientWEBKIT);
    final String uid = context.getDefRegistry().getUid(null, appDesc);
        context.addLoaded(appDesc, uid);
        Mode mode = context.getMode();
        final boolean minify = !(mode.isTestMode() || mode.isDevMode());
View Full Code Here


    private static final String ASYNC_INJECTION_TEMPLATE =
        "$A.run(function() { $A.clientService.injectComponentAsync(%s, '%s', %s); });";

    public IntegrationImpl(String contextPath, Mode mode, boolean initializeAura, String userAgent,
                           String application, IntegrationServiceObserver observer) throws QuickFixException {
        this.client = userAgent != null ? new Client(userAgent) : null;
        this.contextPath = contextPath;
        this.mode = mode;
        this.initializeAura = initializeAura;
        this.application = application != null ? application : DEFAULT_APPLICATION;
        this.observer = observer;
View Full Code Here

    private void assertBrowserProperties(UserAgent userAgent, boolean isTablet,
            boolean isPhone, boolean isAndroid, String formFactor,
            boolean isIPad, boolean isIPhone, boolean isIOS, boolean isWindowsPhone) throws Exception {
        AuraContext context = Aura.getContextService().getCurrentContext();
        String userAgentString = userAgent == null ? null : userAgent.getUserAgentString();
        context.setClient(new Client(userAgentString));
        BrowserValueProvider bvp = new BrowserValueProvider();
        assertBrowserProperty(bvp, BrowserProperty.isTablet, isTablet, userAgentString);
        assertBrowserProperty(bvp, BrowserProperty.isPhone, isPhone, userAgentString);
        assertBrowserProperty(bvp, BrowserProperty.isAndroid, isAndroid, userAgentString);
        assertBrowserProperty(bvp, BrowserProperty.formFactor, formFactor, userAgentString);
View Full Code Here

    private void assertBrowserTypes(UserAgent userAgent, boolean isWebKit, boolean isFirefox, boolean isIE6,
            boolean isIE7, boolean isIE8, boolean isIE9, boolean isIE10, boolean isIE11) throws Exception {
        AuraContext context = Aura.getContextService().getCurrentContext();
        String userAgentString = userAgent == null ? null : userAgent.getUserAgentString();
        context.setClient(new Client(userAgentString));
        BrowserValueProvider bvp = new BrowserValueProvider();
        assertBrowserType(bvp, BrowserType.isWebKit, isWebKit, userAgentString);
        assertBrowserType(bvp, BrowserType.isFirefox, isFirefox, userAgentString);
        assertBrowserType(bvp, BrowserType.isIE6, isIE6, userAgentString);
        assertBrowserType(bvp, BrowserType.isIE7, isIE7, userAgentString);
View Full Code Here

    public void testStyleNamespaceTrueConditions() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceTrueConditions",
                StyleDef.class);
        Aura.getContextService()
                .getCurrentContext()
                .setClient(new Client(UserAgent.GOOGLE_CHROME.getUserAgentString()));
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceTrueConditions"));
        goldFileText(style.getCode());
    }
View Full Code Here

    public void testStyleNamespaceMediaAndConditions() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceMediaAndConditions",
                StyleDef.class);
        Aura.getContextService()
                .getCurrentContext()
                .setClient(new Client(UserAgent.GOOGLE_CHROME.getUserAgentString()));
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceMediaAndConditions"));
        goldFileText(style.getCode());
    }
View Full Code Here

            contextPath = "";
        }
        context.setContextPath(contextPath);
        context.setNum(num.get(request));
        context.setRequestedLocales(Collections.list(request.getLocales()));
        context.setClient(new Client(request.getHeader(HttpHeaders.USER_AGENT)));
        if (configMap != null) {
            getLoaded(context, configMap.get("loaded"));
            @SuppressWarnings("unchecked")
            List<Object> dns = (List<Object>) configMap.get("dn");
            if (dns != null) {
View Full Code Here

TOP

Related Classes of org.auraframework.system.Client

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.