Add API to set load flags used by UnpackingJSBundleLoader

Reviewed By: tadeuzagallo

Differential Revision: D3557667

fbshipit-source-id: 5665667185cda10415210efce83685c3e3abee92
This commit is contained in:
Michał Gregorczyk
2016-08-04 15:42:52 -07:00
committed by Facebook Github Bot 6
parent 38979f9c68
commit f08f23f8cb
3 changed files with 24 additions and 3 deletions

View File

@@ -105,10 +105,21 @@ public class UnpackingJSBundleLoaderTest {
verify(mCatalystInstanceImpl).loadScriptFromOptimizedBundle(
eq(mDestinationPath.getPath()),
eq(URL),
eq(UnpackingJSBundleLoader.UNPACKED_JS_SOURCE));
eq(0));
verifyNoMoreInteractions(mCatalystInstanceImpl);
}
@Test
public void testSetLoadFlags() throws IOException {
mBuilder.setLoadFlags(UnpackingJSBundleLoader.UNPACKED_JS_SOURCE)
.build()
.loadScript(mCatalystInstanceImpl);
verify(mCatalystInstanceImpl).loadScriptFromOptimizedBundle(
eq(mDestinationPath.getPath()),
eq(URL),
eq(UnpackingJSBundleLoader.UNPACKED_JS_SOURCE));
}
@Test
public void testLoadScriptUnpacks() {
mBuilder.build().loadScript(mCatalystInstanceImpl);