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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-unit/trie-spec.js

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: clean diff 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 unified diff | Download patch
OLDNEW
1 <html>
2 <head>
3 <base href="/inspector-debug/"></base>
4 <script src="/inspector-debug/Runtime.js"></script>
5 <script src="/inspector-unit/inspector-unit-test.js"></script>
6 <script>
7 function test() { 1 function test() {
8 var trie; 2 var trie;
3 UnitTest.addResult(`Verify "trie" functionality.`);
9 4
10 UnitTest.runTests([ 5 UnitTest.runTests([
11 function testAddWord() 6 function testAddWord()
12 { 7 {
13 var trie = new Common.Trie(); 8 var trie = new Common.Trie();
14 addWord(trie, "hello"); 9 addWord(trie, "hello");
15 hasWord(trie, "he"); 10 hasWord(trie, "he");
16 hasWord(trie, "hello"); 11 hasWord(trie, "hello");
17 hasWord(trie, "helloo"); 12 hasWord(trie, "helloo");
18 }, 13 },
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 function clear(trie) 162 function clear(trie)
168 { 163 {
169 trie.clear(); 164 trie.clear();
170 UnitTest.addResult("trie.clear()"); 165 UnitTest.addResult("trie.clear()");
171 } 166 }
172 167
173 function longestPrefix(trie, word, fullWordOnly) 168 function longestPrefix(trie, word, fullWordOnly)
174 { 169 {
175 UnitTest.addResult(`trie.longestPrefix("${word}", ${fullWordOnly}) = "${ trie.longestPrefix(word, fullWordOnly)}"`); 170 UnitTest.addResult(`trie.longestPrefix("${word}", ${fullWordOnly}) = "${ trie.longestPrefix(word, fullWordOnly)}"`);
176 } 171 }
177 } 172 }
178 </script>
179 </head>
180 <body>
181 Verify "trie" functionality.
182 </body>
183 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698