Correct logo URL

Summary:
Added static files to remove dependency with `react` website, related PR https://github.com/facebook/react-native/pull/16204

After is merged to master, check if all the URLs are working correctly.

TheSavior
Closes https://github.com/facebook/react-native/pull/16207

Differential Revision: D6509133

Pulled By: hramos

fbshipit-source-id: a31dcc07742211dc17046e7e98d805c2282f2a82
This commit is contained in:
Gustavo Gard 2017-12-07 08:28:35 -08:00 committed by Facebook Github Bot
parent 76a2ca4c9c
commit 8547b7e111
5 changed files with 14 additions and 14 deletions

View File

@ -65,7 +65,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Text>Hello</Text> <Text>Hello</Text>
<Image <Image
source={{ source={{
uri: 'https://facebook.github.io/react/img/logo_small_2x.png?cacheBust=notinCache' + Date.now(), uri: 'https://facebook.github.io/react-native/img/favicon.png?cacheBust=notinCache' + Date.now(),
cache: 'only-if-cached' cache: 'only-if-cached'
}} }}
onLoad={() => this.testComplete('only-if-cached', false)} onLoad={() => this.testComplete('only-if-cached', false)}
@ -74,7 +74,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/> />
<Image <Image
source={{ source={{
uri: 'https://facebook.github.io/react/img/logo_small_2x.png?cacheBust=notinCache' + Date.now(), uri: 'https://facebook.github.io/react-native/img/favicon.png?cacheBust=notinCache' + Date.now(),
cache: 'default' cache: 'default'
}} }}
onLoad={() => this.testComplete('default', true)} onLoad={() => this.testComplete('default', true)}
@ -83,7 +83,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/> />
<Image <Image
source={{ source={{
uri: 'https://facebook.github.io/react/img/logo_small_2x.png?cacheBust=notinCache' + Date.now(), uri: 'https://facebook.github.io/react-native/img/favicon.png?cacheBust=notinCache' + Date.now(),
cache: 'reload' cache: 'reload'
}} }}
onLoad={() => this.testComplete('reload', true)} onLoad={() => this.testComplete('reload', true)}
@ -92,7 +92,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/> />
<Image <Image
source={{ source={{
uri: 'https://facebook.github.io/react/img/logo_small_2x.png?cacheBust=notinCache' + Date.now(), uri: 'https://facebook.github.io/react-native/img/favicon.png?cacheBust=notinCache' + Date.now(),
cache: 'force-cache' cache: 'force-cache'
}} }}
onLoad={() => this.testComplete('force-cache', true)} onLoad={() => this.testComplete('force-cache', true)}

View File

@ -55,7 +55,7 @@ function generateRequestId() {
* /> * />
* <Image * <Image
* style={styles.logo} * style={styles.logo}
* source={{uri: 'https://facebook.github.io/react/logo-og.png'}} * source={{uri: 'https://facebook.github.io/react-native/img/opengraph.png'}}
* /> * />
* </View> * </View>
* ); * );

View File

@ -33,7 +33,7 @@ import type {NativeMethodsMixinType} from 'ReactNativeTypes';
* return ( * return (
* <ImageBackground * <ImageBackground
* style={{width: 50, height: 50}} * style={{width: 50, height: 50}}
* source={{uri: 'https://facebook.github.io/react/logo-og.png'}} * source={{uri: 'https://facebook.github.io/react-native/img/opengraph.png'}}
* > * >
* <Text>React</Text> * <Text>React</Text>
* </ImageBackground> * </ImageBackground>

View File

@ -54,7 +54,7 @@ RCTDefineImageDecoder(RCTImageLoaderTestsDecoder2)
NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader]; } launchOptions:nil]; NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader]; } launchOptions:nil];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/logo-og.png"]]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react-native/img/opengraph.png"]];
[bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) { [bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) {
XCTAssertEqual(progress, 1); XCTAssertEqual(progress, 1);
XCTAssertEqual(total, 1); XCTAssertEqual(total, 1);
@ -85,7 +85,7 @@ RCTDefineImageDecoder(RCTImageLoaderTestsDecoder2)
NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader1, loader2]; } launchOptions:nil]; NS_VALID_UNTIL_END_OF_SCOPE RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:_bundleURL moduleProvider:^{ return @[loader1, loader2]; } launchOptions:nil];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react/logo-og.png"]]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://facebook.github.io/react-native/img/opengraph.png"]];
[bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) { [bridge.imageLoader loadImageWithURLRequest:urlRequest size:CGSizeMake(100, 100) scale:1.0 clipped:YES resizeMode:RCTResizeModeContain progressBlock:^(int64_t progress, int64_t total) {
XCTAssertEqual(progress, 1); XCTAssertEqual(progress, 1);
XCTAssertEqual(total, 1); XCTAssertEqual(total, 1);

View File

@ -195,9 +195,9 @@ var MultipleSourcesExample = createReactClass({
<Image <Image
style={{flex: 1}} style={{flex: 1}}
source={[ source={[
{uri: 'https://facebook.github.io/react/img/logo_small.png', width: 38, height: 38}, {uri: 'https://facebook.github.io/react-native/img/favicon.png', width: 38, height: 38},
{uri: 'https://facebook.github.io/react/img/logo_small_2x.png', width: 76, height: 76}, {uri: 'https://facebook.github.io/react-native/img/favicon.png', width: 76, height: 76},
{uri: 'https://facebook.github.io/react/logo-og.png', width: 400, height: 400} {uri: 'https://facebook.github.io/react-native/img/opengraph.png', width: 400, height: 400}
]} ]}
/> />
</View> </View>
@ -237,7 +237,7 @@ exports.examples = [
render: function() { render: function() {
return ( return (
<Image <Image
source={{uri: 'https://facebook.github.io/react/logo-og.png'}} source={fullImage}
style={styles.base} style={styles.base}
/> />
); );
@ -727,8 +727,8 @@ exports.examples = [
}, },
]; ];
var fullImage = {uri: 'https://facebook.github.io/react/logo-og.png'}; var fullImage = {uri: 'https://facebook.github.io/react-native/img/opengraph.png'};
var smallImage = {uri: 'https://facebook.github.io/react/img/logo_small_2x.png'}; var smallImage = {uri: 'https://facebook.github.io/react-native/img/favicon.png'};
var styles = StyleSheet.create({ var styles = StyleSheet.create({
base: { base: {