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

Side by Side Diff: base/android/jni_generator/jni_generator_tests.py

Issue 10912172: [Android] Upstream ChromeBrowserProvider, the Android port ContentProvider implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily removing tests until we can compile and run them (soon) Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tests for jni_generator.py. 6 """Tests for jni_generator.py.
7 7
8 This test suite contains various tests for the JNI generator. 8 This test suite contains various tests for the JNI generator.
9 It exercises the low-level parser all the way up to the 9 It exercises the low-level parser all the way up to the
10 code generator and ensures the output matches a golden 10 code generator and ensures the output matches a golden
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 ")" 386 ")"
387 "J", reinterpret_cast<void*>(AddBookmarkFromAPI) }, 387 "J", reinterpret_cast<void*>(AddBookmarkFromAPI) },
388 { "nativeFindAll", 388 { "nativeFindAll",
389 "(" 389 "("
390 "Ljava/lang/String;" 390 "Ljava/lang/String;"
391 ")" 391 ")"
392 "I", reinterpret_cast<void*>(FindAll) }, 392 "I", reinterpret_cast<void*>(FindAll) },
393 { "nativeGetDefaultBookmarkFolder", 393 { "nativeGetDefaultBookmarkFolder",
394 "(" 394 "("
395 ")" 395 ")"
396 "Lcom/google/android/apps/chrome/ChromeBrowserProvider$BookmarkNode;", 396 "Lorg/chromium/chrome/browser/ChromeBrowserProvider$BookmarkNode;",
397 reinterpret_cast<void*>(GetDefaultBookmarkFolder) }, 397 reinterpret_cast<void*>(GetDefaultBookmarkFolder) },
398 { "nativeQueryBookmarkFromAPI", 398 { "nativeQueryBookmarkFromAPI",
399 "(" 399 "("
400 "I" 400 "I"
401 "[Ljava/lang/String;" 401 "[Ljava/lang/String;"
402 "Ljava/lang/String;" 402 "Ljava/lang/String;"
403 "[Ljava/lang/String;" 403 "[Ljava/lang/String;"
404 "Ljava/lang/String;" 404 "Ljava/lang/String;"
405 ")" 405 ")"
406 "Lcom/google/android/apps/chrome/database/SQLiteCursor;", 406 "Lcom/google/android/apps/chrome/database/SQLiteCursor;",
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 test_data, ('com/google/lookhowextremelylongiam/snarf/' 1503 test_data, ('com/google/lookhowextremelylongiam/snarf/'
1504 'icankeepthisupallday/ReallyLongClassNamesAreAllTheRage')) 1504 'icankeepthisupallday/ReallyLongClassNamesAreAllTheRage'))
1505 jni_lines = jni_from_java.GetContent().split('\n') 1505 jni_lines = jni_from_java.GetContent().split('\n')
1506 line = filter(lambda line: line.lstrip().startswith('#ifndef'), 1506 line = filter(lambda line: line.lstrip().startswith('#ifndef'),
1507 jni_lines)[0] 1507 jni_lines)[0]
1508 self.assertTrue(len(line) > 80, 1508 self.assertTrue(len(line) > 80,
1509 ('Expected #ifndef line to be > 80 chars: ', line)) 1509 ('Expected #ifndef line to be > 80 chars: ', line))
1510 1510
1511 if __name__ == '__main__': 1511 if __name__ == '__main__':
1512 unittest.main() 1512 unittest.main()
OLDNEW
« no previous file with comments | « base/android/jni_generator/jni_generator.py ('k') | chrome/android/java/src/org/chromium/chrome/browser/BookmarkUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698