OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 exitRunLoop(); | 47 exitRunLoop(); |
48 } | 48 } |
49 }; | 49 }; |
50 | 50 |
51 void runPendingTasks() | 51 void runPendingTasks() |
52 { | 52 { |
53 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE , new QuitTask); | 53 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE , new QuitTask); |
54 enterRunLoop(); | 54 enterRunLoop(); |
55 } | 55 } |
56 | 56 |
57 void runTasksForPeriodInMilliseconds(double runTimeMilliseconds) | |
58 { | |
59 Platform::current()->currentThread()->taskRunner()->postDelayedTask(BLINK_FR OM_HERE, new QuitTask, runTimeMilliseconds); | |
esprehn
2016/02/23 10:30:11
This is scary, what keeps this from being flaky?
alex clarke (OOO till 29th)
2016/02/23 17:16:57
Turns out we don't actually need this for VirtualT
| |
60 enterRunLoop(); | |
61 } | |
62 | |
57 String blinkRootDir() | 63 String blinkRootDir() |
58 { | 64 { |
59 base::FilePath path; | 65 base::FilePath path; |
60 base::PathService::Get(base::DIR_SOURCE_ROOT, &path); | 66 base::PathService::Get(base::DIR_SOURCE_ROOT, &path); |
61 path = path.Append(FILE_PATH_LITERAL("third_party/WebKit")); | 67 path = path.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
62 path = base::MakeAbsoluteFilePath(path); | 68 path = base::MakeAbsoluteFilePath(path); |
63 return String::fromUTF8(path.MaybeAsASCII().c_str()); | 69 return String::fromUTF8(path.MaybeAsASCII().c_str()); |
64 } | 70 } |
65 | 71 |
66 PassRefPtr<SharedBuffer> readFromFile(const String& path) | 72 PassRefPtr<SharedBuffer> readFromFile(const String& path) |
(...skipping 16 matching lines...) Expand all Loading... | |
83 base::MessageLoop::current()->QuitWhenIdle(); | 89 base::MessageLoop::current()->QuitWhenIdle(); |
84 } | 90 } |
85 | 91 |
86 void yieldCurrentThread() | 92 void yieldCurrentThread() |
87 { | 93 { |
88 base::PlatformThread::YieldCurrentThread(); | 94 base::PlatformThread::YieldCurrentThread(); |
89 } | 95 } |
90 | 96 |
91 } // namespace testing | 97 } // namespace testing |
92 } // namespace blink | 98 } // namespace blink |
OLD | NEW |