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 коммит произвёл Facebook Github Bot
Родитель 76a2ca4c9c
Коммит 8547b7e111
5 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -65,7 +65,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Text>Hello</Text>
<Image
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'
}}
onLoad={() => this.testComplete('only-if-cached', false)}
@ -74,7 +74,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/>
<Image
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'
}}
onLoad={() => this.testComplete('default', true)}
@ -83,7 +83,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/>
<Image
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'
}}
onLoad={() => this.testComplete('reload', true)}
@ -92,7 +92,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
/>
<Image
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'
}}
onLoad={() => this.testComplete('force-cache', true)}

Просмотреть файл

@ -55,7 +55,7 @@ function generateRequestId() {
* />
* <Image
* 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>
* );

Просмотреть файл

@ -33,7 +33,7 @@ import type {NativeMethodsMixinType} from 'ReactNativeTypes';
* return (
* <ImageBackground
* 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>
* </ImageBackground>

Просмотреть файл

@ -54,7 +54,7 @@ RCTDefineImageDecoder(RCTImageLoaderTestsDecoder2)
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) {
XCTAssertEqual(progress, 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];
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) {
XCTAssertEqual(progress, 1);
XCTAssertEqual(total, 1);

Просмотреть файл

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