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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-unit/resources/inspector-unit-test-shell.html

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: clean diff Created 4 years, 1 month 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/LayoutTests/http/tests/inspector-unit/resources/inspector-unit-test-shell.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/resources/inspector-unit-test-shell.html b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/resources/inspector-unit-test-shell.html
new file mode 100644
index 0000000000000000000000000000000000000000..88df12fc48c971492482628a921982463e8f682c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/resources/inspector-unit-test-shell.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<base href="/inspector-debug/"></base>
+<script src="/inspector-debug/Runtime.js"></script>
+<script src="/inspector-unit/inspector-unit-test.js"></script>
+<script>
+function getQueryParameter(queryParameter) {
einbinder 2016/11/22 02:19:46 Runtime.queryParam?
chenwilliam 2016/11/22 20:56:05 Done.
+ var query = window.location.search.substring(1);
+ var parameters = query.split('&');
+ for (var i = 0; i < parameters.length; i++) {
+ var pair = parameters[i].split('=');
+ if (decodeURIComponent(pair[0]) === queryParameter)
+ return decodeURIComponent(pair[1]);
+ }
+ throw new Error(`Query parameter: ${queryParameter} not found`);
+}
+
+fetch(`/inspector-unit/${getQueryParameter('test')}`)
+ .then((data) => data.text())
+ .then((testScript) => {
+ eval(testScript);
+ startTest(test);
+ });
+</script>
+</head>
+<body>
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698