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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-completions.html

Issue 2557763003: DevTools: sort completions by prototype. (Closed)
Patch Set: rebaselined Created 4 years 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/console-completions.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/console-completions.html b/third_party/WebKit/LayoutTests/http/tests/inspector/console-completions.html
new file mode 100644
index 0000000000000000000000000000000000000000..c496d6eb69a987f6d2a169695a9fec09477b774b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/console-completions.html
@@ -0,0 +1,57 @@
+<html>
+<head>
+<script src="console-test.js"></script>
+<script src="inspector-test.js"></script>
+<script>
+
+function A() {
+ this.instanceMember = 1;
+ this.member1 = 1;
+}
+
+A.prototype.aMember = 1;
+A.prototype.shadowedMember = 0;
+A.prototype.__proto__ = null;
+
+function B() {
+ A.call(this);
+}
+
+B.prototype.bMember = 1;
+B.prototype.ePriorityMember = 2;
+B.prototype.shadowedMember = 1;
+B.prototype.__proto__ = A.prototype;
+
+function C() {
+ B.call(this);
+}
+
+C.prototype.cMember = 1;
+C.prototype.EPriorityMember = 2;
+C.prototype.shadowedMember = 2;
+C.prototype.__proto__ = B.prototype;
+
+var objectC = new C();
+
+function test()
+{
+ Components.JavaScriptAutocomplete.completionsForExpression("objectC.", "e").then(checkCompletions.bind(this));
+ function checkCompletions(completions)
+ {
+ InspectorTest.addResult("Completions:")
+ for (var completion of completions)
+ InspectorTest.addObject(completion);
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests completions prototype chain.
+</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698