Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: third_party/WebKit/Source/platform/testing/UnitTestHelpers.h

Issue 2654933003: platform/testing/{URL|Unit}TestHelpers improvements (Closed)
Patch Set: header changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/testing/UnitTestHelpers.h
diff --git a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.h b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.h
index 92b3e2e3afd2133232d8cd131c7352812324750d..9ecd6d3360fafde406460d031ae4f215e9798098 100644
--- a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.h
+++ b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.h
@@ -35,21 +35,36 @@ class SharedBuffer;
namespace testing {
+// Note: You may want to use TestingPlatformSupportWithMockScheduler to
+// provides runUntilIdle() method that can work with WebURLLoaderMockFactory.
void runPendingTasks();
-// Wait for delayed task to complete or timers to fire for |delayMs|
+// Waits for delayed task to complete or timers to fire for |delayMs|
// milliseconds.
void runDelayedTasks(double delayMs);
-String blinkRootDir();
-
-PassRefPtr<SharedBuffer> readFromFile(const String& path);
-
void enterRunLoop();
void exitRunLoop();
void yieldCurrentThread();
+// Returns Blink top directory as an absolute path, e.g.
+// /src/third_party/WebKit.
+String blinkRootDir();
+
+// Returns test data absolute path for webkit_unit_tests, i.e.
+// <blinkRootDir>/Source/web/tests/data/<relativePath>.
+// It returns the top web test directory if |relativePath| was not specified.
+String webTestDataPath(const String& relativePath = String());
+
+// Returns test data absolute path for blink_platform_unittests, i.e.
+// <blinkRootDir>/Source/platform/testing/data/<relativePath>.
+// It returns the top platform test directory if |relativePath| was not
+// specified.
+String platformTestDataPath(const String& relativePath = String());
+
+PassRefPtr<SharedBuffer> readFromFile(const String& path);
+
} // namespace testing
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698