@Override public FeatureResource load(Uri uri, Map<String, String> attribs) throws GadgetException { lastAttribs = ImmutableMap.copyOf(attribs); return super.load(uri, attribs); }
@Override public FeatureResource load(Uri uri, Map<String, String> attribs) throws GadgetException { return new BrowserSpecificFeatureResource( uaProvider, super.load(uri, attribs), attribs.get("browser")); } }
@Override public FeatureResource load(Uri uri, Map<String, String> attribs) throws GadgetException { return new BrowserSpecificFeatureResource( uaProvider, super.load(uri, attribs), attribs.get("browser")); } }
@Override public FeatureResource load(Uri uri, Map<String, String> attribs) throws GadgetException { return new BrowserSpecificFeatureResource( uaProvider, super.load(uri, attribs), attribs.get("browser")); } }
public FeatureResource load(Uri uri, Map<String, String> attribs) throws GadgetException { lastAttribs = ImmutableMap.copyOf(attribs); return super.load(uri, attribs); } @Override
} else { resources.add(resourceLoader.load(parsedResource.getSource(), getResourceAttribs(parsedBundle.getAttribs(), parsedResource.getAttribs())));
} else { resources.add(resourceLoader.load(parsedResource.getSource(), getResourceAttribs(parsedBundle.getAttribs(), parsedResource.getAttribs())));
} else { resources.add(resourceLoader.load(parsedResource.getSource(), getResourceAttribs(parsedBundle.getAttribs(), parsedResource.getAttribs())));
@Test public void loadRequestMarkedInternal() throws Exception { String theUrl = "http://apache.org/resource.js"; Uri uri = Uri.parse(theUrl); Map<String, String> attribs = Maps.newHashMap(); attribs.put( "inline", "true" ); CapturingHttpFetcher fetcher = new CapturingHttpFetcher(); FeatureResourceLoader frLoader = new TestFeatureResourceLoader(fetcher, timeSource, new DefaultFeatureFileSystem()); FeatureResource resource = frLoader.load(uri, attribs); assertEquals(URL_JS, resource.getContent()); assertNotNull( fetcher.request ); assertTrue( fetcher.request.isInternalRequest() ); }
@Test public void loadRequestMarkedInternal() throws Exception { String theUrl = "http://apache.org/resource.js"; Uri uri = Uri.parse(theUrl); Map<String, String> attribs = Maps.newHashMap(); attribs.put( "inline", "true" ); CapturingHttpFetcher fetcher = new CapturingHttpFetcher(); FeatureResourceLoader frLoader = new TestFeatureResourceLoader(fetcher, timeSource, new DefaultFeatureFileSystem()); FeatureResource resource = frLoader.load(uri, attribs); assertEquals(URL_JS, resource.getContent()); assertNotNull( fetcher.request ); assertTrue( fetcher.request.isInternalRequest() ); }