Commit b0450b52 authored by Yafei Duan's avatar Yafei Duan Committed by Commit Bot

[Offline Pages] Fix test harness, removing redundant code.

Fixed some remaining issues after removing prerenderer related code in
test harness.

Bug: NONE
Change-Id: I301f1c9309b30bd031e75e019ed2c08865d7f877
Reviewed-on: https://chromium-review.googlesource.com/683310Reviewed-by: default avatarPeter Williamson <petewil@chromium.org>
Commit-Queue: Yafei Duan <romax@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504252}
parent e8fdb3d5
......@@ -525,20 +525,4 @@ public class OfflinePageSavePageLaterEvaluationTest {
setUpIOAndBridge(mUseTestScheduler);
processUrls(mUrls);
}
/**
* Runs testFailureRate with background loader enabled.
* We won't be treating svelte devices differently so enable the feature which would let
* immediate processing also works on svelte devices. This flag will *not* affect normal
* devices.
*/
@Test
@Manual
@TimeoutScale(4)
@CommandLineFlags.Add({"enable-features=BackgroundLoaderOfflinePagesSvelteConcurrentLoading"})
@CommandLineFlags.Remove({
"disable-features=BackgroundLoaderOfflinePagesSvelteConcurrentLoading"})
public void testBackgroundLoaderFailureRate() throws IOException, InterruptedException {
testFailureRate();
}
}
......@@ -32,9 +32,7 @@ DEFAULT_USE_TEST_SCHEDULER = True
# 0 means the batch would be the whole list of urls.
DEFAULT_BATCH_SIZE = 0
DEFAULT_VERBOSE = False
PRERENDER_TEST_CMD = 'OfflinePageSavePageLaterEvaluationTest.testFailureRate'
BACKGROUND_LOADER_CMD = 'OfflinePageSavePageLaterEvaluationTest.' \
'testBackgroundLoaderFailureRate'
DEFAULT_TEST_CMD = 'OfflinePageSavePageLaterEvaluationTest.testFailureRate'
CONFIG_FILENAME = 'test_config'
CONFIG_TEMPLATE = """\
IsUserRequested = {is_user_requested}
......@@ -134,8 +132,7 @@ def main(args):
CONFIG_TEMPLATE.format(
is_user_requested=options.user_request,
use_test_scheduler=options.use_test_scheduler,
schedule_batch_size=options.schedule_batch_size,
use_background_loader=options.use_background_loader))
schedule_batch_size=options.schedule_batch_size))
print 'Uploading config file and input file onto the device.'
subprocess.call(
......@@ -150,8 +147,7 @@ def main(args):
print CONFIG_TEMPLATE.format(
is_user_requested=options.user_request,
use_test_scheduler=options.use_test_scheduler,
schedule_batch_size=options.schedule_batch_size,
use_background_loader=options.use_background_loader)
schedule_batch_size=options.schedule_batch_size)
# Run test with timeout-scale as 20.0 and strict mode off.
# This scale is only applied to timeouts which are defined as scalable ones
# in the test framework (like the timeout used to decide if Chrome doesn't
......@@ -173,10 +169,7 @@ def main(args):
if options.device_id != None:
test_runner_cmd += ['-d', options.device_id]
if options.use_background_loader:
test_runner_cmd += ['-f', BACKGROUND_LOADER_CMD]
else:
test_runner_cmd += ['-f', PRERENDER_TEST_CMD]
test_runner_cmd += ['-f', DEFAULT_TEST_CMD]
subprocess.call(test_runner_cmd)
print 'Fetching results from device...'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment