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

Unified Diff: third_party/WebKit/Source/devtools/tests/console/console-command-copy.html

Issue 2772553002: DevTools: copy console tests to /Source/devtools/tests/ (Closed)
Patch Set: w/ docs & moves Created 3 years, 9 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/devtools/tests/console/console-command-copy.html
diff --git a/third_party/WebKit/Source/devtools/tests/console/console-command-copy.html b/third_party/WebKit/Source/devtools/tests/console/console-command-copy.html
new file mode 100644
index 0000000000000000000000000000000000000000..943529d8f93daec2649338a0fca3ecf33efcc54a
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/tests/console/console-command-copy.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+
+function test()
+{
+ var results = [];
+ var testCases = [
+ "copy('qwerty')",
+ "copy(document.querySelector('p'))",
+ "copy({foo:'bar'})",
+ "var a = {}; a.b = a; copy(a)",
+ "copy(NaN)",
+ "copy(Infinity)",
+ "copy(null)",
+ "copy(undefined)",
+ "copy(1)",
+ "copy(true)",
+ "copy(false)",
+ "copy(null)"
+ ];
+
+ function copyText(text) {
+ results.push(text);
+ if (results.length === testCases.length) {
+ results.sort();
+ for (var result of results)
+ InspectorTest.addResult("InspectorFrontendHost.copyText: " + result);
+ InspectorTest.completeTest();
+ }
+ }
+
+ InspectorFrontendHost.copyText = copyText;
+ for (var i = 0; i < testCases.length; ++i)
+ InspectorTest.RuntimeAgent.evaluate(testCases[i], "", true);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+ Tests that console's copy command is copying into front-end buffer.
+</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698