mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 11:16:06 +08:00
Open sourced ProgressBarTest
Reviewed By: andreicoman11 Differential Revision: D3287396 fbshipit-source-id: 1a814b72ebcb5d13106c6a612b341f217c4dc5a6
This commit is contained in:
committed by
Facebook Github Bot 1
parent
36b085422d
commit
9b56ff6bab
54
ReactAndroid/src/androidTest/js/ProgressBarTestModule.js
Normal file
54
ReactAndroid/src/androidTest/js/ProgressBarTestModule.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule ProgressBarTestModule
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var BatchedBridge = require('BatchedBridge');
|
||||
var React = require('React');
|
||||
var ProgressBar = require('ProgressBarAndroid');
|
||||
var View = require('View');
|
||||
|
||||
var renderApplication = require('renderApplication');
|
||||
|
||||
var ProgressBarSampleApp = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<View>
|
||||
<ProgressBar styleAttr="Horizontal" testID="Horizontal"/>
|
||||
<ProgressBar styleAttr="Small" testID="Small"/>
|
||||
<ProgressBar styleAttr="Large" testID="Large"/>
|
||||
<ProgressBar styleAttr="Normal" testID="Normal"/>
|
||||
<ProgressBar styleAttr="Inverse" testID="Inverse"/>
|
||||
<ProgressBar styleAttr="SmallInverse" testID="SmallInverse"/>
|
||||
<ProgressBar styleAttr="LargeInverse" testID="LargeInverse"/>
|
||||
<View style={{width:200}}>
|
||||
<ProgressBar styleAttr="Horizontal" testID="Horizontal200" />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
getInitialState: function() {
|
||||
return {};
|
||||
},
|
||||
});
|
||||
|
||||
var ProgressBarTestModule = {
|
||||
renderProgressBarApplication: function(rootTag) {
|
||||
renderApplication(ProgressBarSampleApp, {}, rootTag);
|
||||
},
|
||||
};
|
||||
|
||||
BatchedBridge.registerCallableModule(
|
||||
'ProgressBarTestModule',
|
||||
ProgressBarTestModule
|
||||
);
|
||||
|
||||
module.exports = ProgressBarTestModule;
|
||||
@@ -13,8 +13,9 @@
|
||||
console.disableYellowBox = true;
|
||||
|
||||
// Include modules used by integration tests
|
||||
require('ScrollViewTestModule');
|
||||
require('PickerAndroidTestModule');
|
||||
require('ProgressBarTestModule');
|
||||
require('ScrollViewTestModule');
|
||||
require('SwipeRefreshLayoutTestModule');
|
||||
require('TextInputTestModule');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user