summaryrefslogtreecommitdiffstats
path: root/components/scheduler/scheduler.gyp
diff options
context:
space:
mode:
authorskyostil <skyostil@chromium.org>2015-06-04 04:42:05 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-04 11:42:28 +0000
commitae456cc035b8bb76c11d47f28b2efab3dea0c26d (patch)
treeef7ce71f226cde948885c2a6a2a432821e66df18 /components/scheduler/scheduler.gyp
parent78edcd5e7f6eace6313e22625163b61c96371495 (diff)
downloadchromium_src-ae456cc035b8bb76c11d47f28b2efab3dea0c26d.zip
chromium_src-ae456cc035b8bb76c11d47f28b2efab3dea0c26d.tar.gz
chromium_src-ae456cc035b8bb76c11d47f28b2efab3dea0c26d.tar.bz2
scheduler: Always create a real scheduler in unit tests
Previously we would create a dummy scheduler in any test which uses TestBlinkWebUnitTestSupport without first initializing a message loop. This causes problems because the dummy scheduler ignores all tasks it is given. This patch makes the tests more realistic by always creating a real renderer scheduler regardless of whether we have a message loop or not. This is achieved by lazily binding the scheduler to the message loop the first time it is needed. Longer term we would like to refactor these test suites to ensure Blink always has a valid message loop when it is initialized, but this will involve rewiring several tests. BUG=463143,495659 Committed: https://crrev.com/087644f1eab41927823a1a2fc2df08bd4e10fe18 Cr-Commit-Position: refs/heads/master@{#332685} Review URL: https://codereview.chromium.org/1152623008 Cr-Commit-Position: refs/heads/master@{#332818}
Diffstat (limited to 'components/scheduler/scheduler.gyp')
-rw-r--r--components/scheduler/scheduler.gyp11
1 files changed, 11 insertions, 0 deletions
diff --git a/components/scheduler/scheduler.gyp b/components/scheduler/scheduler.gyp
index e77be85..cffc072 100644
--- a/components/scheduler/scheduler.gyp
+++ b/components/scheduler/scheduler.gyp
@@ -50,5 +50,16 @@
'../../third_party/WebKit/public/blink.gyp:blink',
],
},
+ {
+ # GN version: //components/scheduler:test_support
+ 'target_name': 'scheduler_test_support',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '../..',
+ ],
+ 'sources': [
+ '<@(scheduler_test_support_sources)',
+ ],
+ },
],
}